Q10 PostgreSQL Domain 2 · 25–30% of exam

A serverless app opens thousands of short-lived connections and is exhausting an Azure Database for PostgreSQL flexible server. What's the built-in fix?

  1. A Enable the built-in PgBouncer and connect on port 6432 (correct answer)
  2. B Raise max_connections to the highest allowed value
  3. C Add read replicas
  4. D Move the server to the Burstable tier

Shortcut: Too many PostgreSQL connections = built-in PgBouncer on port 6432. Raising max_connections costs memory for every connection, read replicas don't reduce connection churn on the primary, and the Burstable tier has less capacity.

Flexible server includes PgBouncer, a connection pooler on port 6432 that shares a small pool of database connections among many clients. Raising max_connections costs memory for every connection, read replicas don't reduce connection churn on the primary, and the Burstable tier has less capacity.