| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Don't retreat slot's confirmed_flush LSN. |
| Date: | 2025-05-19 07:02:00 |
| Message-ID: | E1uGuVb-002MCR-2r@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)fnst(at)fujitsu(dot)com>
Author: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Tested-by: Nisha Moond <nisha(dot)moond412(at)gmail(dot)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_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e323d9df002debb103a58ba2479368c46804a9b6
Modified Files
--------------
src/backend/replication/logical/logical.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2025-05-19 15:52:20 | pgsql: Fix deparsing FETCH FIRST <expr> ROWS WITH TIES |
| Previous Message | Tom Lane | 2025-05-19 03:32:44 | pgsql: Doc: add pre-branch task to run src/tools/copyright.pl. |