chiprook
← Software
SoftwareOctober 1, 2026, 01:26

PostgreSQL 19 adds WAIT FOR LSN for read-your-writes on replicas

PostgreSQL 19 introduces the WAIT FOR LSN command, which blocks a replica until it has replayed a given WAL position, solving read-your-writes staleness. PHP tests showed 0 stale reads out of 5000 versus 5000 out of 5000 without WAIT, but there are caveats: the LSN can't be bound, WAIT must be the first statement in a transaction, and pg_current_wal_insert_lsn can hang at WAL page boundaries.

PostgreSQL 19 adds WAIT FOR LSN for read-your-writes on replicas
#PostgreSQL#PHP
Read next
Software

AWS adds foreign key constraints to Aurora DSQL

Software

PostgreSQL 19 adds REPACK command with CONCURRENTLY mode

Software

PostgreSQL 19 adds EXPLAIN (ANALYZE, IO) for I/O statistics

Security

WordPress Click2Shell flaw lets hackers run PHP on the server