git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ab41a3)
Fix some comments related to logical repslot advancing
2019年12月26日 13:26:09 +0000 (22:26 +0900)
2019年12月26日 13:26:09 +0000 (22:26 +0900)
confirmed_flush is part of a replication slot's information, but not
confirmed_lsn.

Author: Kyotaro Horiguchi
Discussion: https://postgr.es/m/20191226.175919.17237335658671970.horikyota.ntt@gmail.com
Backpatch-through: 11


diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index 6683fc3f9b749bc226866cf26c280847414a99f0..ba08ad405f463e116e794518782cd0bb6afd6bc7 100644 (file)
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -378,8 +378,8 @@ pg_physical_replication_slot_advance(XLogRecPtr moveto)
/*
* Helper function for advancing our logical replication slot forward.
*
- * The slot's restart_lsn is used as start point for reading records,
- * while confirmed_lsn is used as base point for the decoding context.
+ * The slot's restart_lsn is used as start point for reading records, while
+ * confirmed_flush is used as base point for the decoding context.
*
* We cannot just do LogicalConfirmReceivedLocation to update confirmed_flush,
* because we need to digest WAL to advance restart_lsn allowing to recycle
@@ -549,8 +549,8 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
/*
* Check if the slot is not moving backwards. Physical slots rely simply
* on restart_lsn as a minimum point, while logical slots have confirmed
- * consumption up to confirmed_lsn, meaning that in both cases data older
- * than that is not available anymore.
+ * consumption up to confirmed_flush, meaning that in both cases data
+ * older than that is not available anymore.
*/
if (OidIsValid(MyReplicationSlot->data.database))
minlsn = MyReplicationSlot->data.confirmed_flush;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /