Commit 5459cfd3 authored by Tom Lane's avatar Tom Lane

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 7c4f5240.

Michael Paquier
parent 4c051c41
......@@ -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
......
......@@ -938,7 +938,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
{
Snapshot snap;
snap = SnapBuildInitalSnapshot(ctx->snapshot_builder);
snap = SnapBuildInitialSnapshot(ctx->snapshot_builder);
RestoreTransactionSnapshot(snap, MyProc);
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment