PostgreSQL 19 DBA Walkthrough, Part 2: Read Your Writes with WAIT FOR LSN
A two-session psql walkthrough shows how PostgreSQL 19 uses WAIT FOR LSN to read your writes on an asynchronous standby. It captures the WAL insert LSN on the same primary connection after commit and also covers timeouts, monitoring waiters, and a stalled standby.
Brief · Based on the source excerpt
Why It MattersWhen reads from an asynchronous standby must reflect a just committed write, the application can wait before reporting success without adding that wait to the primary’s synchronous commit path.