From af51b2f042a0808943125b82c0d6e785259069f2 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Mon, 26 Sep 2022 08:47:00 +0530 Subject: [PATCH] Remove unused xid parameter. Commit 6c2003f8a1 removes the use of transaction id's for exporting snapshots. This commit removes one unused xid parameter left behind in SnapBuildGetOrBuildSnapshot. Author: Melih Mutlu Reviewed-By: Zhang Mingli Discussion: https://postgr.es/m/CAGPVpCTqZRoDKgCycw+eYi+Gq41rN9pU-gntgTd7wfsNDpPL3Q@mail.gmail.com --- src/backend/replication/logical/decode.c | 2 +- src/backend/replication/logical/snapbuild.c | 2 +- src/include/replication/snapbuild.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 4d0bf1930dc..2cc0ac9eb09 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -594,7 +594,7 @@ logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) SnapBuildXactNeedsSkip(builder, buf->origptr))) return; - snapshot = SnapBuildGetOrBuildSnapshot(builder, xid); + snapshot = SnapBuildGetOrBuildSnapshot(builder); ReorderBufferQueueMessage(ctx->reorder, xid, snapshot, buf->endptr, message->transactional, message->message, /* first part of message is diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index 1d8ebb4c0d0..54499c06fe9 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -694,7 +694,7 @@ SnapBuildExportSnapshot(SnapBuild *builder) * Ensure there is a snapshot and if not build one for current transaction. */ Snapshot -SnapBuildGetOrBuildSnapshot(SnapBuild *builder, TransactionId xid) +SnapBuildGetOrBuildSnapshot(SnapBuild *builder) { Assert(builder->state == SNAPBUILD_CONSISTENT); diff --git a/src/include/replication/snapbuild.h b/src/include/replication/snapbuild.h index f126ff2e085..2a697e57c31 100644 --- a/src/include/replication/snapbuild.h +++ b/src/include/replication/snapbuild.h @@ -73,8 +73,7 @@ extern void SnapBuildClearExportedSnapshot(void); extern void SnapBuildResetExportedSnapshotState(void); extern SnapBuildState SnapBuildCurrentState(SnapBuild *builder); -extern Snapshot SnapBuildGetOrBuildSnapshot(SnapBuild *builder, - TransactionId xid); +extern Snapshot SnapBuildGetOrBuildSnapshot(SnapBuild *builder); extern bool SnapBuildXactNeedsSkip(SnapBuild *builder, XLogRecPtr ptr); extern XLogRecPtr SnapBuildGetTwoPhaseAt(SnapBuild *builder); -- 2.39.5