From: | Amit Kapila <akapila(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Don't advance origin during apply failure. |
Date: | 2024-08-21 04:05:33 |
Message-ID: | E1sgcbF-000hpl-Bx@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Don't advance origin during apply failure.
We advance origin progress during abort on successful streaming and
application of ROLLBACK in parallel streaming mode. But the origin
shouldn't be advanced during an error or unsuccessful apply due to
shutdown. Otherwise, it will result in a transaction loss as such a
transaction won't be sent again by the server.
Reported-by: Hou Zhijie
Author: Hayato Kuroda and Shveta Malik
Reviewed-by: Amit Kapila
Backpatch-through: 16
Discussion: https://postgr.es/m/TYAPR01MB5692FAC23BE40C69DA8ED4AFF5B92@TYAPR01MB5692.jpnprd01.prod.outlook.com
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/915aafe82a7c31e9f7452e8cedf6371c318388bd
Modified Files
--------------
src/backend/replication/logical/worker.c | 35 ++++++++++++++++++++++++++++++++
src/backend/utils/error/elog.c | 17 ++++++++++++++++
src/include/utils/elog.h | 1 +
src/test/subscription/t/021_twophase.pl | 14 ++++++++++++-
4 files changed, 66 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-08-21 07:43:06 | pgsql: Small code simplification |
Previous Message | Richard Guo | 2024-08-21 03:10:20 | Re: pgsql: Slightly refactor varstr_sortsupport() to improve readability. |