pgsql: Remove assertion for replication origins in PREPARE TRANSACTION - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Remove assertion for replication origins in PREPARE TRANSACTION
Date
Msg-id E1mwx6C-0000WI-FC@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/65af1e842208cf3edec3b74842eec87b4a0138e5

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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: isolationtester: append session name to application_name.
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: isolationtester: append session name to application_name.