Remove unused xid parameter.
authorAmit Kapila <akapila@postgresql.org>
Mon, 26 Sep 2022 03:17:00 +0000 (08:47 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 26 Sep 2022 03:17:00 +0000 (08:47 +0530)
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
src/backend/replication/logical/snapbuild.c
src/include/replication/snapbuild.h

index 4d0bf1930dc2ca31a493e057a7289714b1ae5c88..2cc0ac9eb09f7301285e1d36c97d6907b41ea07b 100644 (file)
@@ -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
index 1d8ebb4c0d0d287310801dd8c1f02d43eeffb547..54499c06fe9d8a9deb84ca67a695fa8e2513f63d 100644 (file)
@@ -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);
 
index f126ff2e085c259fa051424c43cb3d6e161a3333..2a697e57c312c18c734985258853bc8ca9cd8b26 100644 (file)
@@ -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);