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

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Say which LSN gives read-your-writes with WAIT
Date: 2026-09-17 06:37:16
Message-ID: E1x75kC-000000004WB-3biv@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)pg(at)gmail(dot)com>
Reviewed-by: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
Reviewed-by: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAN12%2BYKN7gXb1o9bDWgfA%3D6wjDrqNEgt%2BrXJiAWXgPCXQ5TqpA%40mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a203d20190059ee8a8dd830ecfb7834c704cb53c

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-09-17 08:00:24 pgsql: Fix typos and grammar of some comments
Previous Message Alexander Korotkov 2026-09-17 06:36:20 pgsql: doc: Say which LSN gives read-your-writes with WAIT