fix(db): revert statement_timeout startup options breaking pooled connections#4284
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview This restores compatibility with poolers like PgBouncer/PlanetScale that reject these startup params, at the cost of no longer enforcing those server-side timeouts via connection initialization. Reviewed by Cursor Bugbot for commit b660e34. Configure here. |
fix(db): revert statement_timeout startup options breaking pooled connections (#4284)
Greptile SummaryThis PR reverts #4276 by removing the Confidence Score: 5/5Safe to merge — minimal, targeted revert of a confirmed production regression with no logic changes. The change removes exactly the two No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant Pool as PgBouncer/PlanetScale Pooler
participant DB as PostgreSQL
Note over App,DB: Before revert (broken)
App->>Pool: New connection request
Pool->>DB: Connect + send startup options (-c statement_timeout=90000 ...)
DB-->>Pool: ❌ Error: unrecognized option
Pool-->>App: Connection failed (500 errors)
Note over App,DB: After revert (this PR)
App->>Pool: New connection request (prepare: false)
Pool->>DB: Connect (no startup options)
DB-->>Pool: ✅ Connection established
Pool-->>App: Ready to query
Reviews (1): Last reviewed commit: "fix(db): revert statement_timeout startu..." | Re-trigger Greptile |
Summary
connection.optionsstartup params are incompatible with the PlanetScale/PgBouncer pooler (prod already runsprepare: false), killing every new DB connectionSET LOCAL statement_timeoutper-transaction (or via pooler-compatible URL param) in a follow-upType of Change
Testing
Tested manually — verified DB client opens without the broken startup options
Checklist