Add noPreparedStatements option for connection pools#4
Open
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).
📊 Benchmark Resultsworkflow with no steps💻 Local Development
workflow with 1 step💻 Local Development
workflow with 10 sequential steps💻 Local Development
workflow with 25 sequential steps💻 Local Development
workflow with 50 sequential steps💻 Local Development
Promise.all with 10 concurrent steps💻 Local Development
Promise.all with 25 concurrent steps💻 Local Development
Promise.all with 50 concurrent steps💻 Local Development
Promise.race with 10 concurrent steps💻 Local Development
Promise.race with 25 concurrent steps💻 Local Development
Promise.race with 50 concurrent steps💻 Local Development
workflow with 10 sequential data payload steps (10KB)💻 Local Development
workflow with 25 sequential data payload steps (10KB)💻 Local Development
workflow with 50 sequential data payload steps (10KB)💻 Local Development
workflow with 10 concurrent data payload steps (10KB)💻 Local Development
workflow with 25 concurrent data payload steps (10KB)💻 Local Development
workflow with 50 concurrent data payload steps (10KB)💻 Local Development
Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
stream pipeline with 5 transform steps (1MB)💻 Local Development
10 parallel streams (1MB each)💻 Local Development
fan-out fan-in 10 streams (1MB each)💻 Local Development
SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests📋 Other (2 failed)e2e-local-postgres-nest-stable (2 failed):
Details by Category✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
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 support for disabling prepared statements in the embedded graphile-worker queue, which is required when using connection pools that cannot honour per-session prepared statements (such as PgBouncer in transaction pooling mode or PGlite-socket).
Key Changes
noPreparedStatementsconfiguration option toPostgresWorldConfigwith comprehensive documentation explaining when it's neededWORKFLOW_POSTGRES_NO_PREPARED_STATEMENTSenvironment variable support (accepts1ortrue)createQueue()to forward thenoPreparedStatementsflag to graphile-worker'smakeWorkerUtils()andrun()callscreateWorld()to resolve the configuration option from both explicit config and environment variablesImplementation Details
undefined(prepared statements enabled) to maintain backward compatibility1andtrue(case-insensitive) as truthy values