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

Question: migrate or implement pgx v5 driver #827

Closed
m-chrome opened this issue Oct 17, 2022 · 3 comments · Fixed by #848
Closed

Question: migrate or implement pgx v5 driver #827

m-chrome opened this issue Oct 17, 2022 · 3 comments · Fixed by #848

Comments

@m-chrome
Copy link
Contributor

Is your feature request related to a problem? Please describe.

PGX driver V5 was released - https://pkg.go.dev/github.com/jackc/pgx/v5.

Describe the solution you'd like

  1. I suggest migrating from pgx v4 to pgx v5 OR write new PgxV5 driver implementation
  2. Update pgx4 module to latest 4.17.2, if need to have v4 driver
@alexedwards
Copy link

alexedwards commented Oct 20, 2022

This is causing me problems as well.

As far as I can see it's not possible to import both github.com/jackc/pgx/v5 and github.com/golang-migrate/migrate/v4/database/pgx (which uses github.com/jackc/pgx/v4) as it results in a runtime panic panic: sql: Register called twice for driver pgx.

treuherz added a commit to treuherz/migrate that referenced this issue Nov 1, 2022
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
treuherz added a commit to treuherz/migrate that referenced this issue Nov 1, 2022
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
treuherz added a commit to treuherz/migrate that referenced this issue Dec 16, 2022
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
@mprimeaux
Copy link

We are now experiencing the same exception as @alexedwards.

treuherz added a commit to treuherz/migrate that referenced this issue Jan 26, 2023
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
treuherz added a commit to treuherz/migrate that referenced this issue Mar 14, 2023
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
treuherz added a commit to treuherz/migrate that referenced this issue Mar 14, 2023
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
@treuherz
Copy link
Contributor

As of pgx 4.18.1 and 5.3.1, it should now be possible to import the stdlib compatibility layer from multiple versions of pgx (see jackc/pgx#1480). This might unblock people for now, and hopefully #848 will be merged soon so we only need to import one version at all

(@alexedwards @mprimeaux, tagging because you mentioned you were having the runtime panic issue)

treuherz added a commit to treuherz/migrate that referenced this issue Mar 17, 2023
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
treuherz added a commit to treuherz/migrate that referenced this issue Mar 17, 2023
Fixes golang-migrate#827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions
@dhui dhui closed this as completed in #848 Apr 5, 2023
dhui pushed a commit that referenced this issue Apr 5, 2023
* Add driver for pgx v5

Fixes #827

- Move existing driver into database/pgx/v4
- Make exported items into database/pgx into links to database/pgx/v4,
  marked as Deprecated
- Remove most tests in database/pgx, leaving a couple of e2e tests
  behind to help ensure backwards compatibility.
- Mark defunct ErrDatabaseDirty as Deprecated - no code returns it
- Bump pgx/v4 dependency
- Add test runs for newer Postgres versions

* Tweak pgx tags and registration strings

* Tweak registration strings
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 a pull request may close this issue.

4 participants