Skip to content

Commit 5459cfd

Browse files
committed
Fix typos in logical replication support for initial data copy.
Fix an incorrect assert condition (noted by Coverity), and spell the new name of the function correctly. Typos introduced in commit 7c4f524. Michael Paquier
1 parent 4c051c4 commit 5459cfd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/backend/replication/logical/snapbuild.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -499,22 +499,22 @@ SnapBuildBuildSnapshot(SnapBuild *builder, TransactionId xid)
499499
}
500500

501501
/*
502-
* Build the initial slot snapshot and convert it to normal snapshot that
502+
* Build the initial slot snapshot and convert it to a normal snapshot that
503503
* is understood by HeapTupleSatisfiesMVCC.
504504
*
505505
* The snapshot will be usable directly in current transaction or exported
506506
* for loading in different transaction.
507507
*/
508508
Snapshot
509-
SnapBuildInitalSnapshot(SnapBuild *builder)
509+
SnapBuildInitialSnapshot(SnapBuild *builder)
510510
{
511511
Snapshot snap;
512512
TransactionId xid;
513513
TransactionId *newxip;
514514
int newxcnt = 0;
515515

516516
Assert(!FirstSnapshotSet);
517-
Assert(XactIsoLevel = XACT_REPEATABLE_READ);
517+
Assert(XactIsoLevel == XACT_REPEATABLE_READ);
518518

519519
if (builder->state != SNAPBUILD_CONSISTENT)
520520
elog(ERROR, "cannot build an initial slot snapshot before reaching a consistent state");
@@ -604,7 +604,7 @@ SnapBuildExportSnapshot(SnapBuild *builder)
604604
XactIsoLevel = XACT_REPEATABLE_READ;
605605
XactReadOnly = true;
606606

607-
snap = SnapBuildInitalSnapshot(builder);
607+
snap = SnapBuildInitialSnapshot(builder);
608608

609609
/*
610610
* now that we've built a plain snapshot, make it active and use the

src/backend/replication/walsender.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
938938
{
939939
Snapshot snap;
940940

941-
snap = SnapBuildInitalSnapshot(ctx->snapshot_builder);
941+
snap = SnapBuildInitialSnapshot(ctx->snapshot_builder);
942942
RestoreTransactionSnapshot(snap, MyProc);
943943
}
944944

src/include/replication/snapbuild.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extern void FreeSnapshotBuilder(SnapBuild *cache);
5959

6060
extern void SnapBuildSnapDecRefcount(Snapshot snap);
6161

62-
extern Snapshot SnapBuildInitalSnapshot(SnapBuild *builder);
62+
extern Snapshot SnapBuildInitialSnapshot(SnapBuild *builder);
6363
extern const char *SnapBuildExportSnapshot(SnapBuild *snapstate);
6464
extern void SnapBuildClearExportedSnapshot(void);
6565

0 commit comments

Comments
 (0)