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

Commit53336e8

Browse files
committed
Release lock after encountering bogs row in vac_truncate_clog()
When vac_truncate_clog() encounters bogus datfrozenxid / datminmxid values, itreturns early. Unfortunately, until now, it did not releaseWrapLimitsVacuumLock. If the backend later tries to acquireWrapLimitsVacuumLock, the session / autovacuum worker hangs in anuncancellable way. Similarly, other sessions will hang waiting for thelock. However, if the backend holding the lock exited or errored out for somereason, the lock was released.The bug was introduced as a side effect of566372b.It is interesting that there are no production reports of this problem. Thatis likely due to a mix of bugs leading to bogus values having gotten lesscommon, process exit releasing locks and instances of hangs being hard todebug for "normal" users.Discussion:https://postgr.es/m/20230621221208.vhsqgduwfpzwxnpg@awork3.anarazel.de
1 parent7fffcc2 commit53336e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,12 +1639,16 @@ vac_truncate_clog(TransactionId frozenXID,
16391639
ereport(WARNING,
16401640
(errmsg("some databases have not been vacuumed in over 2 billion transactions"),
16411641
errdetail("You might have already suffered transaction-wraparound data loss.")));
1642+
LWLockRelease(WrapLimitsVacuumLock);
16421643
return;
16431644
}
16441645

16451646
/* chicken out if data is bogus in any other way */
16461647
if (bogus)
1648+
{
1649+
LWLockRelease(WrapLimitsVacuumLock);
16471650
return;
1651+
}
16481652

16491653
/*
16501654
* Advance the oldest value for commit timestamps before truncating, so

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp