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

Commit6199b1f

Browse files
committed
Fix corner case in autovacuum-forcing logic for multixact wraparound.
Since find_multixact_start() relies on SimpleLruDoesPhysicalPageExist(),and that function looks only at the on-disk state, it's possible for itto fail to find a page that exists in the in-memory SLRU that has notbeen written yet. If that happens, SetOffsetVacuumLimit() willerroneously decide to force emergency autovacuuming immediately.We should probably fix find_multixact_start() to consider the datacached in memory as well as on the on-disk state, but that's no excusefor SetOffsetVacuumLimit() to be stupid about the case where it canno longer read the value after having previously succeeded in doing so.Report by Andres Freund.
1 parent4130b2c commit6199b1f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/backend/access/transam/multixact.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,6 +2680,18 @@ SetOffsetVacuumLimit(bool finish_setup)
26802680
(errmsg("oldest MultiXactId member offset unknown")));
26812681
}
26822682

2683+
/*
2684+
* If we failed to get the oldest offset this time, but we have a value
2685+
* from a previous pass through this function, assess the need for
2686+
* autovacuum based on that old value rather than automatically forcing
2687+
* it.
2688+
*/
2689+
if (prevOldestOffsetKnown&& !oldestOffsetKnown)
2690+
{
2691+
oldestOffset=prevOldestOffset;
2692+
oldestOffsetKnown= true;
2693+
}
2694+
26832695
/*
26842696
* Do we need an emergency autovacuum? If we're not sure, assume yes.
26852697
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp