prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
582 stars 62 forks source link

Pgbouncer mode for PostgreSQL #133

Closed pimeys closed 4 years ago

pimeys commented 4 years ago

Introducing a new flag for PostgreSQL: pgbouncer.

When true, after BEGIN of each transaction a query of DEALLOCATE ALL is executed to clean existing prepared statements from the session to prevent collisions.

To be able to use Quaint with pgbouncer's transaction mode, every query needs to be inside a transaction and the connection string should have pgbouncer=true set.