Postgresql medium
Why is it often necessary to implement an external connection pooler (like PgBouncer) when scaling a PostgreSQL cluster?
- A PostgreSQL lacks support for SSL/TLS encryption for incoming client network connections.
- B PostgreSQL spawns a full OS process for every connection, which consumes significant RAM.
- C PostgreSQL cannot handle more than 50 concurrent transactions without crashing the CPU.
- D PostgreSQL requires a third-party load balancer to handle basic SQL query parsing logic.
Answer: B. PostgreSQL spawns a full OS process for every connection, which consumes significant RAM.
Unlike thread-based databases, Postgres' process-per-connection model is heavy. Idle connections still consume resources. PgBouncer keeps a small set of 'real' connections to the DB and multiplexes many client connections over them.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a PostgreSQL environment, what functional characteristic distinguishes a `MATERIALIZED VIEW` from a standard `VIEW`?
- Which standard PostgreSQL utility is designed to extract a single database into a script or archive file for backup purposes?
- Why would PostgreSQL reject a `DELETE` operation on a record despite the user having full administrative privileges?
- The 'Heap Only Tuples' (HOT) optimization improves UPDATE performance. Which specific set of conditions must be met for a HOT update to occur?
- Which native command-line utility is used to execute SQL queries and manage PostgreSQL databases from a terminal session?
- What is the specific purpose of 'Freezing' a row (modifying its `xmin` status) during a major VACUUM operation?