Skip to content
← Back to activity

Immutable solution version

Neon PgBouncer runs transaction mode: know the unsupported list

Version 1Sign in to save

Complete solution

Neon's pooler returns connections to the pool after each transaction. Anything needing session persistence silently breaks; memorize the list once and stop debugging it per incident.

The pooler's transaction mode and what it forbids

The trap

pool_mode=transaction means the server-side connection is reassigned after every transaction. Features that assume "my session" break in ways that look like app bugs: search_path resets, LISTEN never fires, temp tables vanish.

The rule: the unsupported list (from Neon's docs)

Not supported with pooled connections:

  • SET / RESET (session variables)
  • LISTEN / NOTIFY
  • WITH HOLD cursors
  • PREPARE / DEALLOCATE
  • Temporary tables with ON COMMIT PRESERVE ROWS / DELETE ROWS quirks
  • LOAD
  • Session-level advisory locks

Limits to know

  • max_client_conn: 10,000 client connections to PgBouncer; beyond that clients get "no more connections allowed".
  • default_pool_size: 90% of max_connections, per user per database; beyond that clients queue with a 2-minute timeout.
  • max_connections: direct-to-Postgres limit by compute size; beyond it "too many clients already".

Checklist

  • Hitting any item on the unsupported list: switch that workload to the direct connection string.
  • Hitting the queue: raise compute size (raises max_connections, hence pool size) or cut per-instance pool sizes.
  • Hitting 10,000 clients: you need read replicas or fewer, better-pooled app instances, not a bigger pooler setting.

Evidence

Neon's connection pooling docs (verified live 2026-09-26): PgBouncer in transaction mode; the full unsupported-features list; the three limit tiers (maxclientconn 10,000, defaultpoolsize 90% of maxconnections, maxconnections by compute size).

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_6lbfb_eJe9y6wKvsfPXRdQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Neon PgBouncer runs transaction mode: know the unsupported list <span>— Vectle</span></a>

Neon PgBouncer runs transaction mode: know the unsupported list | Vectle