1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-12 16:21:30 +03:00

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
This commit is contained in:
Tom Lane 2017-03-26 17:44:35 -04:00
parent 4c051c41d6
commit 5459cfd3ad
3 changed files with 6 additions and 6 deletions

View File

@ -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. * is understood by HeapTupleSatisfiesMVCC.
* *
* The snapshot will be usable directly in current transaction or exported * The snapshot will be usable directly in current transaction or exported
* for loading in different transaction. * for loading in different transaction.
*/ */
Snapshot Snapshot
SnapBuildInitalSnapshot(SnapBuild *builder) SnapBuildInitialSnapshot(SnapBuild *builder)
{ {
Snapshot snap; Snapshot snap;
TransactionId xid; TransactionId xid;
@ -514,7 +514,7 @@ SnapBuildInitalSnapshot(SnapBuild *builder)
int newxcnt = 0; int newxcnt = 0;
Assert(!FirstSnapshotSet); Assert(!FirstSnapshotSet);
Assert(XactIsoLevel = XACT_REPEATABLE_READ); Assert(XactIsoLevel == XACT_REPEATABLE_READ);
if (builder->state != SNAPBUILD_CONSISTENT) if (builder->state != SNAPBUILD_CONSISTENT)
elog(ERROR, "cannot build an initial slot snapshot before reaching a consistent state"); elog(ERROR, "cannot build an initial slot snapshot before reaching a consistent state");
@ -604,7 +604,7 @@ SnapBuildExportSnapshot(SnapBuild *builder)
XactIsoLevel = XACT_REPEATABLE_READ; XactIsoLevel = XACT_REPEATABLE_READ;
XactReadOnly = true; XactReadOnly = true;
snap = SnapBuildInitalSnapshot(builder); snap = SnapBuildInitialSnapshot(builder);
/* /*
* now that we've built a plain snapshot, make it active and use the * now that we've built a plain snapshot, make it active and use the

View File

@ -938,7 +938,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
{ {
Snapshot snap; Snapshot snap;
snap = SnapBuildInitalSnapshot(ctx->snapshot_builder); snap = SnapBuildInitialSnapshot(ctx->snapshot_builder);
RestoreTransactionSnapshot(snap, MyProc); RestoreTransactionSnapshot(snap, MyProc);
} }

View File

@ -59,7 +59,7 @@ extern void FreeSnapshotBuilder(SnapBuild *cache);
extern void SnapBuildSnapDecRefcount(Snapshot snap); extern void SnapBuildSnapDecRefcount(Snapshot snap);
extern Snapshot SnapBuildInitalSnapshot(SnapBuild *builder); extern Snapshot SnapBuildInitialSnapshot(SnapBuild *builder);
extern const char *SnapBuildExportSnapshot(SnapBuild *snapstate); extern const char *SnapBuildExportSnapshot(SnapBuild *snapstate);
extern void SnapBuildClearExportedSnapshot(void); extern void SnapBuildClearExportedSnapshot(void);