Tech News
← Home  ·  All topics

Database Outages

1 GoKawiil brief on this topic

PostgreSQL's recovery_prefetch feature found causing replication outages

A bug in PostgreSQL's recovery_prefetch feature has been tied to real-world production outages, including a case where a customer's physical standby server suffered replay lag of several hours. The issue stems from the prefetch code issuing unnecessary fadvise system calls even when a page was already available from a full-page image in the WAL, burning excessive CPU in kernel space. The underlying concern was flagged by PostgreSQL developer Stephen Frost in a February 2021 mailing list message, well before the feature shipped, but was not addressed at the time.