Skip to content

Hotfix: DB connection on Supabase transaction pooler (port 6543)#44

Merged
immerSIR merged 1 commit into
223MapAction:mainfrom
immerSIR:hotfix-db-pooler
Jul 1, 2026
Merged

Hotfix: DB connection on Supabase transaction pooler (port 6543)#44
immerSIR merged 1 commit into
223MapAction:mainfrom
immerSIR:hotfix-db-pooler

Conversation

@immerSIR

@immerSIR immerSIR commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Prod outage fix — 502 on all endpoints after #43

Root cause (from live container logs):

OperationalError: connection to "db.nwzsmdbyjmjzhruguwrb.supabase.co", port 6543 failed:
FATAL: unsupported startup parameter: options

Prod connects via the Supabase transaction pooler (6543), which rejects the libpq options startup parameter. Our settings set search_path=public through exactly that parameter, so every DB connection was refused → migrate/daphne died → 502.

Fix: don't send the options param on the 6543 pooler. The Supabase postgres role already has public before extensions in its default search_path, and all app tables live in public, so schema resolution is correct without it. Session-pooler/direct/local connections (dev, CI) still send options unchanged. Escape hatch: DB_SET_SEARCH_PATH=true|false.

One file, backwards-compatible. Merging redeploys and restores prod.

@immerSIR immerSIR merged commit f825b4f into 223MapAction:main Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant