Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres: replace the package lib/pq with pgx #15343

Merged
merged 8 commits into from
May 23, 2022
Merged

postgres: replace the package lib/pq with pgx #15343

merged 8 commits into from
May 23, 2022

Conversation

kalafut
Copy link
Contributor

@kalafut kalafut commented May 9, 2022

The lib/pq package has been in maintenance mode for a while now which means that the package will not be receiving updates aside from bug fixes. The package does not support the ability to set multi-host on the connection string, which is a feature that has been requested by our users and customers. We will be swapping out this library with jackc/pgx which is being actively maintained and supports multi-host.

This PR will focus on transitioning our imports, and a separate PR will tackle multi-host support.

These are the following places affected by this import change:

  • builtin/postgres (deprecated engine)
  • database/postgres
  • database/redshift
  • physical/cockroachdb
  • physical/postgres

@calvn calvn changed the title [DO NOT MERGE] WIP replacing lib/pq postgres: replace the package lib/pq with pgx May 20, 2022
@calvn calvn marked this pull request as ready for review May 20, 2022 17:49
@calvn calvn requested a review from a team May 20, 2022 17:49
builtin/logical/postgresql/secret_creds.go Outdated Show resolved Hide resolved
go.sum Show resolved Hide resolved
physical/cockroachdb/cockroachdb_test.go Show resolved Hide resolved
physical/postgresql/postgresql.go Outdated Show resolved Hide resolved
plugins/database/redshift/redshift_test.go Show resolved Hide resolved
plugins/database/redshift/redshift.go Outdated Show resolved Hide resolved
@calvn calvn added this to the 1.11.0-rc1 milestone May 20, 2022
@calvn calvn requested review from swenson and fairclothjm May 23, 2022 18:13
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calvn calvn merged commit c5a88aa into main May 23, 2022
@calvn calvn deleted the postgres-dep-change branch May 23, 2022 19:49
Gabrielopesantos pushed a commit to Gabrielopesantos/vault that referenced this pull request Jun 6, 2022
* WIP replacing lib/pq

* change timezome param to be URI format

* add changelog

* add changelog for redshift

* update changelog

* add test for DSN style connection string

* more parseurl and quoteidentify to sdk; include copyright and license

* call dbutil.ParseURL instead, fix import ordering

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants