agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: doc: Say which LSN gives read-your-writes with WAIT
Date: Thu, 17 Sep 2026 06:36:20 +0000
Message-ID: <E1x75jI-000000004UN-2NlI@gemulon.postgresql.org> (raw)

doc: Say which LSN gives read-your-writes with WAIT

The reference page and the read-your-writes section both presented
WAIT in standby_replay mode as enough for read-your-writes, without
saying which LSN to wait for.  Read as written, an LSN taken after the
last statement but before COMMIT would do, and it would not: the standby
position WAIT compares against is the end of the last replayed record, so
a target that falls inside the COMMIT record is satisfied while that
record is still unapplied.

Say that the target must be at or after the end of the write
transaction's COMMIT record, and note in the example that autocommit is
what puts the UPDATE's commit before the call that reads the position.

Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/CAN12%2BYKN7gXb1o9bDWgfA%3D6wjDrqNEgt%2BrXJiAWXgPCXQ5TqpA%40mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2af020eacb8b74232a0570f72a05dd1f274f68de

Modified Files
--------------
doc/src/sgml/high-availability.sgml | 11 ++++++-----
doc/src/sgml/ref/wait.sgml          | 19 +++++++++++++------
2 files changed, 19 insertions(+), 11 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1x75jI-000000004UN-2NlI@gemulon.postgresql.org>
Permalink:  ../E1x75jI-000000004UN-2NlI@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x75jI-000000004UN-2NlI@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: doc: Say which LSN gives read-your-writes with WAIT
  In-Reply-To: <E1x75jI-000000004UN-2NlI@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox