Perform a zero-downtime PgBouncer restart or config reload using an so_reuseport rolling restart

domain: pgbouncer.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Enable so_reuseport in pgbouncer.ini and run two or more PgBouncer processes bound to the same listen port
  2. For a pure config change that doesn't need a new binary, send the RELOAD command over the admin console (or SIGHUP) instead of restarting
  3. For a binary upgrade, restart processes one at a time: send SHUTDOWN WAIT_FOR_CLIENTS (or SIGTERM) to one process while the others keep accepting new connections on the shared port
  4. Let clients on the draining process reconnect naturally (via server_idle_timeout or app-side reconnect) so that process exits cleanly once empty
  5. Start the replacement process on the same port and repeat for each remaining process

Known gotchas

Related routes

Deploy PgBouncer as a connection pooler in front of Postgres to reduce connection overhead
pgbouncer.org · 5 steps · unrated
Configure PgBouncer transaction-mode pooling and avoid prepared-statement pitfalls
pgbouncer · 6 steps · unrated
Configure PgBouncer transaction pooling with a Python psycopg application
pgbouncer.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans