mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-23 00:30:41 +02:00
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
This commit is contained in:
parent
9e551a14cb
commit
1b2356a291
@ -343,8 +343,8 @@ pg_physical_replication_slot_advance(XLogRecPtr moveto)
|
|||||||
/*
|
/*
|
||||||
* Helper function for advancing our logical replication slot forward.
|
* Helper function for advancing our logical replication slot forward.
|
||||||
*
|
*
|
||||||
* The slot's restart_lsn is used as start point for reading records,
|
* The slot's restart_lsn is used as start point for reading records, while
|
||||||
* while confirmed_lsn is used as base point for the decoding context.
|
* confirmed_flush is used as base point for the decoding context.
|
||||||
*
|
*
|
||||||
* We cannot just do LogicalConfirmReceivedLocation to update confirmed_flush,
|
* We cannot just do LogicalConfirmReceivedLocation to update confirmed_flush,
|
||||||
* because we need to digest WAL to advance restart_lsn allowing to recycle
|
* because we need to digest WAL to advance restart_lsn allowing to recycle
|
||||||
@ -514,8 +514,8 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
|
|||||||
/*
|
/*
|
||||||
* Check if the slot is not moving backwards. Physical slots rely simply
|
* Check if the slot is not moving backwards. Physical slots rely simply
|
||||||
* on restart_lsn as a minimum point, while logical slots have confirmed
|
* on restart_lsn as a minimum point, while logical slots have confirmed
|
||||||
* consumption up to confirmed_lsn, meaning that in both cases data older
|
* consumption up to confirmed_flush, meaning that in both cases data
|
||||||
* than that is not available anymore.
|
* older than that is not available anymore.
|
||||||
*/
|
*/
|
||||||
if (OidIsValid(MyReplicationSlot->data.database))
|
if (OidIsValid(MyReplicationSlot->data.database))
|
||||||
minlsn = MyReplicationSlot->data.confirmed_flush;
|
minlsn = MyReplicationSlot->data.confirmed_flush;
|
||||||
|
Loading…
Reference in New Issue
Block a user