From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't advance origin during apply failure.
Date: Wed, 21 Aug 2024 04:05:33 +0000
Message-ID: <E1sgcbF-000hpn-CX@gemulon.postgresql.org> (raw)
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_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b39c5272c1d22d80a736647081b60a55a2d9d51e
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't advance origin during apply failure.
In-Reply-To: <E1sgcbF-000hpn-CX@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox