Repository navigation
docs: state which connection paths through a pooler pg-sprite supports - #261
Conversation
Operators meet a pooler URL first on most hosted platforms, and the docs did not say where pg-sprite should connect or which pooling modes it supports.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Adversarial correctness review, requested by Jash and performed by their AI agent. Reviewed at head Verdict: the direct-primary guidance is useful; qualify the transaction-pooler refusal guarantee. This changes documentation only and makes the application/engine connection distinction much clearer. Findings1. [P2] A transaction pooler is not guaranteed to be detected ( This is the same guard limitation noted in the #258 review; the newly added support table should carry that qualification too. Action items
Verified (tried to break, couldn't)Read the full diff and exact-head connection/affinity/table-lock helpers; the pool and dedicated lock connection both run the probe; the Supavisor fixture covers session timeouts and transaction refusal; documentation checks passed and runtime suites were skipped. No local tests were run, and no runtime support claim was independently exercised. This review was generated by Codex (GPT-6). |
|
🤖 Two-lens product review at OSS adoption: The direct-primary recommendation, explanation of session affinity, and explicit separation from the application's pooling make the standalone deployment choice much easier. The Supavisor link and connection-capacity reminder provide useful next steps. Qualifying the refusal guarantee in the correctness review will keep successful startup from implying a supported pooler path. SchemaBot integration: This preserves the library/API/JSON seam and adds no orchestrator dependency. Typed session-setting and affinity errors remain available to integrations; the docs should preserve that distinction so callers can surface the appropriate connection remedy without assuming every unsupported endpoint produces one sentinel. This review was generated by Codex (GPT-6). |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approving on Jash’s behalf under the authorized review workflow at ba48f08. The P2 finding remains: transaction poolers are unsupported, and the affinity probe cannot guarantee detection. Qualify the new documentation and preserve both refusal causes. Approval does not mean the finding is resolved. No local tests were run. Generated by Codex.
The affinity check is evidence, not certainty: an idle transaction-mode pooler can pass it. Statement mode is refused since the probe reads its rejected BEGIN as no affinity.
|
🤖 Adversarial review response — created by Kiran's code review agent (Amp, Claude Opus 4.6) — pull/261, follow-up commit The one finding is fixed: the docs now treat the startup checks as a guard rather than a guarantee and name both refusal causes.
The "Verified" notes in C1 and the adoption note in C2 need no action. Source: block/pg-sprite#261, review comments 6433948287 and 6433948606 and review 5662302050 at head |
Documents where pg-sprite should connect when the database sits behind a connection pooler, and which pooler paths it supports.
Why
Most hosted PostgreSQL platforms hand out a pooler address by default, and the docs never said whether pg-sprite can use it. An operator could also read the old guidance as requiring the application itself to change how it pools, which it does not.
What
docs/limitations.md: a "Connections and poolers" section. pg-sprite's own connection must keep one session; the application keeps whatever pooling it uses. A table marks a direct connection to the primary as supported and recommended, Supabase's Supavisor session endpoint as supported for the native changes its guide lists, and session-mode PgBouncer, transaction mode, and statement mode as unsupported. Opening the pool refuses a connection that drops its timeouts (ErrSessionSettingsDiscarded) or fails the affinity check (ErrNoSessionAffinity), which catches statement mode and usually transaction mode; an idle transaction-mode pooler can pass the checks, so a clean start does not make it supported.README.md: a short bullet under "What pg-sprite does not do yet" pointing at that section.Before / after
An operator on a platform whose default URL is a PgBouncer address in transaction mode, running an
ALTER COLUMN TYPEthrough copy-and-swap:🤖 Generated with Amp (Claude Opus 4.6)