PostgreSQL 19 WAIT FOR LSN: How to Read Your Writes on an Async Standby
A PostgreSQL 19.0 demo shows how WAIT FOR LSN lets an async standby serve reads of just-committed writes. With replay paused, primary writes continued and standby_replay timed out after about 2 seconds, while standby_flush confirmed WAL was durable on the standby.
Why It MattersIf only some requests need to read their own writes from a standby, applications can wait selectively but must decide whether to retry or read from the primary on timeout.