• Sources: primary, discussion
  • Summary: Jeremy Schneider shows that recovery_prefetch converts large sequential I/O on the primary into 8k random reads on standbys, amplifying IOPS up to 16x, and issues prefetches for pages already restored from full-page images. With synchronous replication, a write burst plus a walreceiver disconnect leaves the standby replaying from WAL until caught up, and writes on the primary hang for over 30 minutes in his pgbench reproduction. Setting recovery_prefetch off removed the long stall in the same test.
  • Why it matters: Teams running synchronous replication on IOPS-limited cloud disks should test recovery_prefetch off and consider quorum commit with two standbys.