• Sources: primary
  • Summary: Jeremy Schneider reports that recovery_prefetch amplifies replica read IOPS up to 16x for large sequential I/O on the primary. If the walreceiver drops during a write burst, the standby stays in WAL restore mode until it catches up. With synchronous replication, primary writes then hang for 30 minutes or more. He published a reproduction repository and found that recovery_prefetch off avoids the long stall.
  • Why it matters: Postgres operators running synchronous replicas on IOPS-limited disks should test recovery_prefetch off and consider quorum commit with two standbys.