Add noPreparedStatements option for connection pools#1880
Open
Pom4H wants to merge 1 commit intovercel:mainfrom
Open
Add noPreparedStatements option for connection pools#1880Pom4H wants to merge 1 commit intovercel:mainfrom
Pom4H wants to merge 1 commit intovercel:mainfrom
Conversation
…Glite Forwards graphile-worker's noPreparedStatements flag through createWorld() config and a WORKFLOW_POSTGRES_NO_PREPARED_STATEMENTS env var. Required when the pool routes traffic through a layer that cannot honour per-session prepared statements (PgBouncer txn mode, PGlite-socket).
🦋 Changeset detectedLatest commit: f1dd636 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
@claude is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
noPreparedStatementssupport to@workflow/world-postgresand forward it to the embeddedgraphile-workerqueue.This is needed when the PostgreSQL connection goes through a pool/proxy/adapter that cannot safely preserve per-session prepared statements, such as PgBouncer in transaction pooling mode. It is also useful for PGlite-socket-like adapters where session semantics may differ from a normal dedicated PostgreSQL backend connection.
Changes
noPreparedStatements?: booleantoPostgresWorldConfigWORKFLOW_POSTGRES_NO_PREPARED_STATEMENTS=1|trueenv supportnoPreparedStatements: trueto graphile-workermakeWorkerUtils()noPreparedStatements: trueto graphile-workerrun()packages/world-postgres/README.md@workflow/world-postgresNotes
This option only affects the embedded graphile-worker queue. It does not change how the shared
pg.Pool, Drizzle client, or stream storage issue queries.