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

Commited16f73

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 parent86e4751 commited16f73

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
@@ -2661,6 +2661,18 @@ SetOffsetVacuumLimit(bool finish_setup)
26612661
(errmsg("oldest MultiXactId member offset unknown")));
26622662
}
26632663

2664+
/*
2665+
* If we failed to get the oldest offset this time, but we have a value
2666+
* from a previous pass through this function, assess the need for
2667+
* autovacuum based on that old value rather than automatically forcing
2668+
* it.
2669+
*/
2670+
if (prevOldestOffsetKnown&& !oldestOffsetKnown)
2671+
{
2672+
oldestOffset=prevOldestOffset;
2673+
oldestOffsetKnown= true;
2674+
}
2675+
26642676
/*
26652677
* Do we need an emergency autovacuum? If we're not sure, assume yes.
26662678
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp