Skip to content

Add PGBOUNCER_SERVER_RESET_QUERY_ALWAYS config#129

Open
pimeys wants to merge 1 commit intoheroku:mainfrom
prisma:reset_query_always
Open

Add PGBOUNCER_SERVER_RESET_QUERY_ALWAYS config#129
pimeys wants to merge 1 commit intoheroku:mainfrom
prisma:reset_query_always

Conversation

@pimeys
Copy link
Copy Markdown

@pimeys pimeys commented Jan 24, 2020

This gives us a possibility to clear prepared statements in a transaction mode.

If the application respectfully runs all queries in transactions; it allows us to use prepared statements in this mode. The downside of this is more roundtrips to the database even for simple reads through BEGIN and COMMIT/ROLLBACK, but it allows us to utilize the escaping and SQL injection protections of PostgreSQL.

This is the missing part for Prisma2 to work with Heroku's Pgbouncer offering with slight modifications to the runtime to force transactions in every query, if detecting Pgbouncer.

@pimeys
Copy link
Copy Markdown
Author

pimeys commented Apr 2, 2020

?

@beanieboi
Copy link
Copy Markdown
Member

@pimeys thx! could you please rebase the Changelog.md

@valeriecodes valeriecodes changed the base branch from master to main August 7, 2020 21:14
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.

2 participants