From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove assertion for replication origins in PREPARE TRANSACTION
Date: Tue, 14 Dec 2021 01:59:24 +0000
Message-ID: <E1mwx6C-0000WD-EI@gemulon.postgresql.org> (raw)
Remove assertion for replication origins in PREPARE TRANSACTION
When using replication origins, pg_replication_origin_xact_setup() is an
optional choice to be able to set a LSN and a timestamp to mark the
origin, which would be additionally added to WAL for transaction commits
or aborts (including 2PC transactions). An assertion in the code path
of PREPARE TRANSACTION assumed that this data should always be set, so
it would trigger when using replication origins without setting up an
origin LSN. Some tests are added to cover more this kind of scenario.
Oversight in commit 1eb6d65.
Per discussion with Amit Kapila and Masahiko Sawada.
Discussion: https://postgr.es/m/YbbBfNSvMm5nIINV@paquier.xyz
Backpatch-through: 11
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4be3e005e5da931aa816e3c04e1217c33de52fd6
Modified Files
--------------
contrib/test_decoding/expected/replorigin.out | 76 +++++++++++++++++++++++++++
contrib/test_decoding/sql/replorigin.sql | 32 +++++++++++
src/backend/access/transam/twophase.c | 1 -
3 files changed, 108 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Remove assertion for replication origins in PREPARE TRANSACTION
In-Reply-To: <E1mwx6C-0000WD-EI@gemulon.postgresql.org>
References: <E1mwx6C-0000WD-EI@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