Improve WAIT FOR read-your-writes consistency doc

From: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Improve WAIT FOR read-your-writes consistency doc
Date: 2026-09-08 21:42:16
Message-ID: CAN12+YKN7gXb1o9bDWgfA=6wjDrqNEgt+rXJiAWXgPCXQ5TqpA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The WAIT FOR docs say that "The standby_replay mode waits for the LSN to be
replayed (applied to the database), which is useful to achieve read-your-writes
consistency while using an async replica for reads and the primary for writes."

I think that needs one more caveat.

WAIT FOR success does not guarantee read-your-writes if the supplied LSN
is before the transaction's COMMIT record.

Maybe the last sentence should be qualified with:

" .... the primary for writes, provided that the target LSN was
captured after COMMIT on the primary."

This may be obvious to users of this feature, but perhaps worth being
more explicit about it.

Thoughts?

--
Sami Imseih
Amazon Web Services (AWS)

Browse pgsql-hackers by date

  From Date Subject
Previous Message Daniel Gustafsson 2026-09-08 21:38:19 Trying to break online checksums with LLMs