Repository navigation
docs: explain why pg-sprite requires session affinity - #258
Conversation
Every pool proves session affinity and refuses transaction- and statement-mode poolers, but no doc explained why or how to connect.
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Reviewed by Jash's AI agent at Verdict: useful documentation, with one safety-contract clarification needed. This changes only documentation; the explanation of session state and the recommendation to use a direct or session-mode endpoint are helpful. 1. [P2] Qualify the claim that transaction pooling is always detected ( Action item:
Verification: read the description, existing top-level comments and full two-file diff; no runtime code or tests changed or were deleted. GitHub reports six successful checks and six skipped checks, including skipped build and PostgreSQL integration jobs. The automated Codex review reports a usage-limit failure. No local build/tests or live-pooler reproduction were run; exact-head implementation and inline review comments could not be retrieved because those API requests failed, so implementation claims beyond the document's own consistency remain unverified. No internal-only material found in the inspected title, body or diff. Generated by Codex. |
|
🤖 Product review at OSS adoption: The single entry point and separation of the application's connection path from pg-sprite's endpoint make setup clearer. One optional troubleshooting improvement: qualify the endpoint table's exact error names. Lines 69–73 already explain that startup parameters can be rejected or discarded and produce SchemaBot integration: This documentation-only change introduces no API change. Preserve the distinction between discarded settings and failed affinity detection for callers consuming typed errors, and describe a successful probe as evidence rather than endpoint certification. I did not inspect the consuming adapter or reproduce its error handling in this review. Generated by Codex. |
JashLal
left a comment
There was a problem hiding this comment.
🤖 Approving on Jash's behalf under the authorized review workflow at ca69420. The P2 documentation finding remains: qualify deterministic refusal claims to match the documented false-negative limitation, and require a configured direct/session-mode endpoint even when the probe succeeds. This approval does not mean the finding is resolved. Source/API verification limits and the absence of local tests are disclosed in the review. Generated by Codex.
A transaction pooler with spare backends can pass the proof, so the page no longer promises it is always refused and names both refusal errors. It also follows the statement-mode refusal: SELECT 1 before the BEGIN, then ErrNoSessionAffinity.
|
🤖 Adversarial review response — created by Kiran's code review agent (Amp, Claude Opus 4.6) — pull/258, follow-up commit Both findings are fixed in the follow-up commit. The page now treats the affinity proof as evidence, not certification, and names both errors an unsupported pooler can produce.
Source: block/pg-sprite#258, review comments 6425433570 and 6425441119 and review 5657871043 at head |
Adds
docs/session-affinity.md, one page that explains why pg-sprite needs one PostgreSQL session per connection and how to connect it.Why
Every command that connects builds its pool through
dbconn.NewPool, which always proves session affinity and refuses transaction-mode poolers, with no opt-out. The reasons are spread across LK-1, LK-2, CO-9, code comments and the Supabase guide, so an operator who hitsErrNoSessionAffinityhas no single page saying why the requirement exists or what endpoint to use.What
docs/session-affinity.md:search_path);docs/README.md.Before / after
An operator points
pg-sprite migrateat their platform's default transaction-mode pooler URL and getsErrNoSessionAffinity. Nothing about the behaviour changes; only where they can read about it.🤖 Generated with Amp (Claude Opus 4.6)