Postgres Writes Got Faster, But Replication Broke: A Deep Dive
2025-07-21

Boosting write throughput for the pg_search Postgres extension using an LSM tree broke physical replication. This post details the challenges of ensuring both physical and logical consistency when using write-optimized data structures in a replicated database. The authors describe how they solved the problem by implementing atomic logging and leveraging Postgres's `hot_standby_feedback` setting to coordinate cleanup operations with standby replicas, maintaining data integrity even under heavy write loads.
Development
LSM Tree