migrate
migrate copied to clipboard
Question: migrate or implement pgx v5 driver
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
- I suggest migrating from pgx v4 to pgx v5 OR write new
PgxV5
driver implementation - Update pgx4 module to latest 4.17.2, if need to have v4 driver
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
.
We are now experiencing the same exception as @alexedwards.
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 https://github.com/jackc/pgx/issues/1480). This might unblock people for now, and hopefully https://github.com/golang-migrate/migrate/pull/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)