ELSEIF
Your brief EB
398 stories from 200 feeds 1259 clusters Refreshed 24 minutes ago next pull 11:24

DATABASES Signal 169

PostgreSQL 19 introduces WAIT FOR, a SQL command that blocks until WAL reaches a given LSN

PostgreSQL 19's new WAIT FOR command lets a session block until WAL has reached a specific position, providing read-your-writes consistency on asynchronous replicas without synchronous replication overhead.

WHY IT MATTERS

For engineers running read replicas, WAIT FOR removes the need for application-side polling or synchronous replication to guarantee a read sees a recent write. It lets a read wait only as long as needed for the replica to catch up, and it exposes wait events for monitoring. However, it does not understand timelines, so after a promotion a success may refer to WAL from a different timeline.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

WAIT FOR blocks until the standby has replayed WAL up to a specified LSN, then the read proceeds.

02

It supports modes standby_replay, standby_flush, standby_write, and primary_flush, with TIMEOUT and NO_THROW options.

03

Unlike synchronous_commit=remote_apply, writes stay asynchronous; only reads that need the guarantee wait.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
ClickHouse Read your writes: WAIT FOR in PostgreSQL 19 Open ↗