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

Commit5201002

Browse files
Avoid spurious Hot Standby conflicts from btree delete records.
Similar conflicts were already avoided for related record types.Massive over-caution resulted in a usability bug. Clear theoreticalbasis for doing this is now confirmed by me.Request to remove from Heikki (twice), over-caution by me.
1 parent357edc9 commit5201002

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

‎src/backend/storage/ipc/standby.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -266,21 +266,13 @@ ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode
266266

267267
/*
268268
* If we get passed InvalidTransactionId then we are a little surprised,
269-
* but it is theoretically possible, so spit out a DEBUG1 message, but not
270-
* one that needs translating.
271-
*
272-
* We grab latestCompletedXid instead because this is the very latest
273-
* value it could ever be.
269+
* but it is theoretically possible in normal running. It also happens
270+
* when replaying already applied WAL records after a standby crash or
271+
* restart. If latestRemovedXid is invalid then there is no conflict. That
272+
* rule applies across all record types that suffer from this conflict.
274273
*/
275274
if (!TransactionIdIsValid(latestRemovedXid))
276-
{
277-
elog(DEBUG1,"invalid latestremovexXid reported, using latestcompletedxid instead");
278-
279-
LWLockAcquire(ProcArrayLock,LW_SHARED);
280-
latestRemovedXid=ShmemVariableCache->latestCompletedXid;
281-
LWLockRelease(ProcArrayLock);
282-
}
283-
Assert(TransactionIdIsValid(latestRemovedXid));
275+
return;
284276

285277
backends=GetConflictingVirtualXIDs(latestRemovedXid,
286278
node.dbNode);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp