Postgresql medium
How should a database administrator configure the 'Shared Buffers' parameter for a dedicated PostgreSQL server instance?
- A Set to 100% of RAM to ensure that all database operations are handled entirely in-memory.
- B Set to 25% - 40% of RAM, allowing the remaining RAM to be used by the OS for Page Caching.
- C Set to a fixed 4GB limit, as the JVM-based engine cannot address larger memory segments.
- D Set to 5% of RAM, as the database relies exclusively on external Redis caches for reliability.
Answer: B. Set to 25% - 40% of RAM, allowing the remaining RAM to be used by the OS for Page Caching.
PostgreSQL relies on the Operating System's Page Cache. If you allocate too much RAM to 'Shared Buffers', you might actually hurt performance due to double-buffering and less efficient I/O handling by the Linux kernel.
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?