aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-12-26 22:26:26 +0900
committerMichael Paquier <michael@paquier.xyz>2019-12-26 22:26:26 +0900
commit50fa688f303024447fa8b2419a733b551f752769 (patch)
tree0317adbe9e61014da604ae546f9a449fad620ad9
parent8052aaf521e4885477bd1af100edcf21031e6d11 (diff)
downloadpostgresql-50fa688f303024447fa8b2419a733b551f752769.tar.gz
postgresql-50fa688f303024447fa8b2419a733b551f752769.zip
Fix some comments related to logical repslot advancing
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
-rw-r--r--src/backend/replication/slotfuncs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index 42da6318238..7139961d458 100644
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -379,8 +379,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
@@ -550,8 +550,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;