Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5af4456

Browse files
committed
Fix thinko introduced in2bef06d et al.
The callers for GetOldestSafeDecodingTransactionId() all inverted theargument for the argument introduced in2bef06d. Luckily thisappears to be inconsequential for the moment, as we wait forconcurrent in-progress transaction when assembling asnapshot. Additionally this could only make a difference when adding asecond logical slot, because only a pre-existing slot could cause anissue by lowering the returned xid dangerously much.Reported-By: Antonin HouskaDiscussion:https://postgr.es/m/32704.1496993134@localhostBackport: 9.4-, where2bef06d was backpatched to.
1 parent0d1f98b commit5af4456

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/replication/logical/logical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ CreateInitDecodingContext(char *plugin,
288288
*/
289289
LWLockAcquire(ProcArrayLock,LW_EXCLUSIVE);
290290

291-
xmin_horizon=GetOldestSafeDecodingTransactionId(need_full_snapshot);
291+
xmin_horizon=GetOldestSafeDecodingTransactionId(!need_full_snapshot);
292292

293293
slot->effective_catalog_xmin=xmin_horizon;
294294
slot->data.catalog_xmin=xmin_horizon;

‎src/backend/replication/logical/snapbuild.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
574574
TransactionIdsafeXid;
575575

576576
LWLockAcquire(ProcArrayLock,LW_SHARED);
577-
safeXid=GetOldestSafeDecodingTransactionId(true);
577+
safeXid=GetOldestSafeDecodingTransactionId(false);
578578
LWLockRelease(ProcArrayLock);
579579

580580
Assert(TransactionIdPrecedesOrEquals(safeXid,snap->xmin));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp