From 5459cfd3ad52b87a1e2ed293ae55e733c6964715 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 26 Mar 2017 17:44:35 -0400 Subject: [PATCH] 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 7c4f52409. Michael Paquier --- src/backend/replication/logical/snapbuild.c | 8 ++++---- src/backend/replication/walsender.c | 2 +- src/include/replication/snapbuild.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index a73a7b98f9..227960452d 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -499,14 +499,14 @@ SnapBuildBuildSnapshot(SnapBuild *builder, TransactionId xid) } /* - * Build the initial slot snapshot and convert it to normal snapshot that + * Build the initial slot snapshot and convert it to a normal snapshot that * is understood by HeapTupleSatisfiesMVCC. * * The snapshot will be usable directly in current transaction or exported * for loading in different transaction. */ Snapshot -SnapBuildInitalSnapshot(SnapBuild *builder) +SnapBuildInitialSnapshot(SnapBuild *builder) { Snapshot snap; TransactionId xid; @@ -514,7 +514,7 @@ SnapBuildInitalSnapshot(SnapBuild *builder) int newxcnt = 0; Assert(!FirstSnapshotSet); - Assert(XactIsoLevel = XACT_REPEATABLE_READ); + Assert(XactIsoLevel == XACT_REPEATABLE_READ); if (builder->state != SNAPBUILD_CONSISTENT) elog(ERROR, "cannot build an initial slot snapshot before reaching a consistent state"); @@ -604,7 +604,7 @@ SnapBuildExportSnapshot(SnapBuild *builder) XactIsoLevel = XACT_REPEATABLE_READ; XactReadOnly = true; - snap = SnapBuildInitalSnapshot(builder); + snap = SnapBuildInitialSnapshot(builder); /* * now that we've built a plain snapshot, make it active and use the diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 59ae22df8c..040ad7b737 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -938,7 +938,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd) { Snapshot snap; - snap = SnapBuildInitalSnapshot(ctx->snapshot_builder); + snap = SnapBuildInitialSnapshot(ctx->snapshot_builder); RestoreTransactionSnapshot(snap, MyProc); } diff --git a/src/include/replication/snapbuild.h b/src/include/replication/snapbuild.h index 091a9f91e3..a8ae63116a 100644 --- a/src/include/replication/snapbuild.h +++ b/src/include/replication/snapbuild.h @@ -59,7 +59,7 @@ extern void FreeSnapshotBuilder(SnapBuild *cache); extern void SnapBuildSnapDecRefcount(Snapshot snap); -extern Snapshot SnapBuildInitalSnapshot(SnapBuild *builder); +extern Snapshot SnapBuildInitialSnapshot(SnapBuild *builder); extern const char *SnapBuildExportSnapshot(SnapBuild *snapstate); extern void SnapBuildClearExportedSnapshot(void); -- 2.40.0