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

Commitb91b3f0

Browse files
committed
Clamp result of MultiXactMemberFreezeThreshold
The purpose of the function is to reduce the effectiveautovacuum_multixact_freeze_max_age if the multixact members SLRU isapproaching wraparound, to make multixid freezing more aggressive.The returned value should therefore never be greater than plainautovacuum_multixact_freeze_max_age.Reviewed-by: Robert HaasDiscussion:https://www.postgresql.org/message-id/85fb354c-f89f-4d47-b3a2-3cbd461c90a3@iki.fiBackpatch-through: 12, all supported versions
1 parent5762530 commitb91b3f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,7 @@ MultiXactMemberFreezeThreshold(void)
28282828
uint32multixacts;
28292829
uint32victim_multixacts;
28302830
doublefraction;
2831+
intresult;
28312832

28322833
/* If we can't determine member space utilization, assume the worst. */
28332834
if (!ReadMultiXactCounts(&multixacts,&members))
@@ -2849,7 +2850,13 @@ MultiXactMemberFreezeThreshold(void)
28492850
/* fraction could be > 1.0, but lowest possible freeze age is zero */
28502851
if (victim_multixacts>multixacts)
28512852
return0;
2852-
returnmultixacts-victim_multixacts;
2853+
result=multixacts-victim_multixacts;
2854+
2855+
/*
2856+
* Clamp to autovacuum_multixact_freeze_max_age, so that we never make
2857+
* autovacuum less aggressive than it would otherwise be.
2858+
*/
2859+
returnMin(result,autovacuum_multixact_freeze_max_age);
28532860
}
28542861

28552862
typedefstructmxtruncinfo

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp