PostgreSQL 19's WAIT FOR LSN replaces read-your-writes polling loop
PostgreSQL 19, whose fourth beta shipped on 24 September 2026, adds the WAIT FOR LSN command that blocks a connection until a given WAL position is reached on the server. In a ten-client test it delivered 3,552 completions/sec versus 3,182 for busy-polling, while standby CPU dropped from 57% to 38%.
- WAIT FOR LSN blocks a connection until a target WAL position is reached
- 10 clients: 3,552 completions/sec vs 3,182 with busy-polling
- Mean standby CPU fell from 57% to 38%
- NO_THROW option returns a timeout status instead of an error
Read next
Software