summaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/proto.c
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2025-02-12 16:55:00 -0800
committerMasahiko Sawada <msawada@postgresql.org>2025-02-12 16:55:00 -0800
commitabfb29648f9adcde84656afde1d50bc8b8e9b6e0 (patch)
tree49fcb4493e63d3af49edfa848d379bd74b503898 /src/backend/replication/logical/proto.c
parent072ee847ad4c3fb52b0c24f7dddbe0798bd70c24 (diff)
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
Diffstat (limited to 'src/backend/replication/logical/proto.c')
-rw-r--r--src/backend/replication/logical/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/proto.c b/src/backend/replication/logical/proto.c
index dc72b7c8f77..1a352b542dc 100644
--- a/src/backend/replication/logical/proto.c
+++ b/src/backend/replication/logical/proto.c
@@ -164,7 +164,7 @@ logicalrep_write_prepare_common(StringInfo out, LogicalRepMsgType type,
* which case we expect to have a valid GID.
*/
Assert(txn->gid != NULL);
- Assert(rbtxn_prepared(txn));
+ Assert(rbtxn_is_prepared(txn));
Assert(TransactionIdIsValid(txn->xid));
/* send the flags field */