From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename RBTXN_PREPARE to RBTXN_IS_PREPARE for better clarificatio
Date: Thu, 13 Feb 2025 00:55:38 +0000
Message-ID: <E1tiNVy-006p4m-4j@gemulon.postgresql.org> (raw)
Rename RBTXN_PREPARE to RBTXN_IS_PREPARE for better clarification.
RBTXN_PREPARE flag and rbtxn_prepared macro could be misinterpreted as
either indicating the transaction type (e.g. a prepared transaction or
a normal transaction) or its currentstate (e.g. skipped or its prepare
message is sent), especially after commit 072ee847ad4 introduced the
RBTXN_SENT_PREPARE flag and the rbtxn_sent_prepare macro.
The RBTXN_PREPARE flag (and its corresponding macro) have been renamed
to RBTXN_IS_PREPARE to explicitly indicate the transaction
type. Therefore, this commit also adds the RBTXN_IS_PREPARE flag to
the transaction that is a prepared transaction and has been skipped,
which previously had only the RBTXN_SKIPPED_PREPARE flag.
Reviewed-by: Amit Kapila, Peter Smith
Discussion: https://postgr.es/m/CAA4eK1KgNmBsG%3D155E7QQ6TX9RoWnM4z5Z20SvsbwxSe_QXYsg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/abfb29648f9adcde84656afde1d50bc8b8e9b6e0
Modified Files
--------------
src/backend/replication/logical/proto.c | 2 +-
src/backend/replication/logical/reorderbuffer.c | 50 +++++++++++++++----------
src/backend/replication/logical/snapbuild.c | 2 +-
src/include/replication/reorderbuffer.h | 8 ++--
4 files changed, 38 insertions(+), 24 deletions(-)
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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Rename RBTXN_PREPARE to RBTXN_IS_PREPARE for better clarificatio
In-Reply-To: <E1tiNVy-006p4m-4j@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