dep: consider migration to pgx
We are currently using database/sql for store and connections, we should do some due diligence on migrating to pgx
pgx is allegedly faster. Many PostgreSQL specific features such as LISTEN / NOTIFY and COPY are not available through the database/sql interface, but our via pgx
Main consideration with pgx, is it would lock us into progres.
Main consideration with pgx, is it would lock us into progres.
We are already kind of locked up to postgres given our lib/pq usage. We should migrate anyway.
Main consideration with pgx, is it would lock us into progres.
We are already kind of locked up to postgres given our
lib/pqusage. We should migrate anyway.
not just that, but we use a bunch of PGSQL specific features in our schemas. IIRC even JSONB is pgsql-specific. I was looking into migration a bit last week as part of the (off and on) periodical update work. The biggest time sink in the migration would be that the sqlc generated code would no longer generate database/sql types but native PGSQL types, same for errors.
I do agree we should switch, though. As you said, we're already tied to Postgres and pgx is both better maintained, more feature rich and faster.
I don't think we'll find this issue if we do decide to migrate, closing in favor of newer issues.