All Questions
Postgresql hard

PostgreSQL manages its Shared Buffer pool using a 'Clock Sweep' algorithm. How does this provide resistance against cache-thrashing from one-time sequential scans?

  1. A It prioritizes index pages by assigning them a permanent 'pinned' status in the L2 cache.
  2. B It tracks a 'Usage Count' per page; pages with higher counts are protected from immediate eviction.
  3. C It randomly selects a subset of the least-recently-used pages to be compressed into a swap file.
  4. D It forces all sequential scans to bypass the shared buffers and read directly from the OS page cache.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions