agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: doc: Say which LSN gives read-your-writes with WAIT
2+ messages / 1 participants
[nested] [flat]

* pgsql: doc: Say which LSN gives read-your-writes with WAIT
@ 2026-09-17 06:36 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alexander Korotkov @ 2026-09-17 06:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: doc: Say which LSN gives read-your-writes with WAIT
@ 2026-09-17 06:37 Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alexander Korotkov @ 2026-09-17 06:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-17 06:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 06:36 pgsql: doc: Say which LSN gives read-your-writes with WAIT Alexander Korotkov <akorotkov@postgresql.org>
2026-09-17 06:37 pgsql: doc: Say which LSN gives read-your-writes with WAIT Alexander Korotkov <akorotkov@postgresql.org>

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