pgsql: Don't retreat slot's confirmed_flush LSN. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Don't retreat slot's confirmed_flush LSN.
Date
Msg-id E1uGuVb-002MCJ-2g@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't retreat slot's confirmed_flush LSN.

Prevent moving the confirmed_flush backwards, as this could lead to data
duplication issues caused by replicating already replicated changes.

This can happen when a client acknowledges an LSN it doesn't have to do
anything for, and thus didn't store persistently. After a restart, the
client can send the prior LSN that it stored persistently as an
acknowledgement, but we need to ignore such an LSN to avoid retreating
confirm_flush LSN.

Diagnosed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Author: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Tested-by: Nisha Moond <nisha.moond412@gmail.com>
Backpatch-through: 13
Discussion: https://postgr.es/m/CAJpy0uDZ29P=BYB1JDWMCh-6wXaNqMwG1u1mB4=10Ly0x7HhwQ@mail.gmail.com
Discussion: https://postgr.es/m/OS0PR01MB57164AB5716AF2E477D53F6F9489A@OS0PR01MB5716.jpnprd01.prod.outlook.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7318f241d29c0b90e0b8b7e39ebd1914f68fd37a

Modified Files
--------------
src/backend/replication/logical/logical.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: add pre-branch task to run src/tools/copyright.pl.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix deparsing FETCH FIRST ROWS WITH TIES