pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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-0000WL-Fb@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_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8abb6c27ec7538a4975544896c35e2f9a73a9f30

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



view thread (5+ messages)  latest in thread

Message-ID: <E1mwx6C-0000WL-Fb@gemulon.postgresql.org>
Permalink:  ../E1mwx6C-0000WL-Fb@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mwx6C-0000WL-Fb@gemulon.postgresql.org

 · 

reply

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-0000WL-Fb@gemulon.postgresql.org>
  References: <E1mwx6C-0000WL-Fb@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