November 24, 2026·Jhury Kevin Lastre, Tech Director

Reading Your Own Writes on a PostgreSQL 19 Replica

A customer changes a delivery address. The confirmation succeeds. They refresh the page and the old address appears. A moment later the new one returns. Both database queries may have succeeded, but the customer now has a good reason to call support.

A write can commit on the primary before a standby has replayed it. If the confirmation page reads from that standby, it can observe an earlier version. PostgreSQL 19, released on November 19, gives applications a way to coordinate that handoff with the new WAIT command. PostgreSQL 19 announcement.

Decide which read needs the guarantee

For the address confirmation, capture a write-ahead log position on the primary that covers the committed change. On the chosen standby, wait for replay to reach that position before starting the confirmation query with a fresh snapshot. Keep the read on that same standby. A connection pool that silently routes the second request to another replica loses the guarantee.

Set a short, explicit timeout and decide what happens when it expires. For an address needed to place an order, reading from the primary may justify the extra load. For a report the customer can revisit, a clear pending state may be enough. A successful write should never prompt a second submission simply because its first read took longer than expected. PostgreSQL WAIT reference.

Before rolling this out, I would introduce replica lag in staging and watch the confirmation through both paths. Record time spent waiting and how often reads fall back to the primary. Those numbers tell you whether a stronger consistency guarantee is affordable on this particular screen.