On Tue, Jun 22, 2021 at 08:32:18AM +0200, Laurenz Albe wrote:
> > What does "the amount of used member storage space exceeds 50% of the
> > addressable storage space" mean?
>
> You are right. See MultiXactMemberFreezeThreshold for the whole story.
>
> What about:
>
> As a safety device, an aggressive vacuum scan will occur for any table
> whose multixact-age (see <xref linkend="vacuum-for-multixact-wraparound"/>)
> is greater than <xref linkend="guc-autovacuum-multixact-freeze-max-age"/>.
> Also, if the storage occupied by multixacts exceeds 2GB, aggressive vacuum
> scans will occur more often for all tables, starting with those that have
> the oldest multixact-age.
> Both of these kinds ...
Yes, very good. There were three problems with the original paragraph:
* Had duplicate words
* Had awkward phrasing
* Used undefined terms
Your version fixes all three of those. Patch attached.
> I hope I read the source right concerning the 2GB.
I can confirm the 2GB. do_vacuum() calls
MultiXactMemberFreezeThreshold() to set its
effective_multixact_freeze_max_age. MultiXactMemberFreezeThreshold()
compares the number of members to 2^32 (0xFFFFFFFF) / 2 or 2GB:
#define MaxMultiXactOffset ((MultiXactOffset) 0xFFFFFFFF)
#define MULTIXACT_MEMBER_SAFE_THRESHOLD (MaxMultiXactOffset / 2)
/* If member space utilization is low, no special action is required. */
if (members <= MULTIXACT_MEMBER_SAFE_THRESHOLD)
return autovacuum_multixact_freeze_max_age;
If that test fails, autovacuum_multixact_freeze_max_age is set much more
aggressively.
--
Bruce Momjian <[email protected]> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml
index 4b535809b6..dd0eed193e 100644
--- a/doc/src/sgml/maintenance.sgml
+++ b/doc/src/sgml/maintenance.sgml
@@ -697,14 +697,14 @@ HINT: Stop the postmaster and vacuum that database in single-user mode.
</para>
<para>
- As a safety device, an aggressive vacuum scan will occur for any table
- whose multixact-age is greater than
- <xref linkend="guc-autovacuum-multixact-freeze-max-age"/>. Aggressive
- vacuum scans will also occur progressively for all tables, starting with
- those that have the oldest multixact-age, if the amount of used member
- storage space exceeds the amount 50% of the addressable storage space.
- Both of these kinds of aggressive scans will occur even if autovacuum is
- nominally disabled.
+ As a safety device, an aggressive vacuum scan will
+ occur for any table whose multixact-age (see <xref
+ linkend="vacuum-for-multixact-wraparound"/>) is greater than <xref
+ linkend="guc-autovacuum-multixact-freeze-max-age"/>. Also, if the
+ storage occupied by multixacts exceeds 2GB, aggressive vacuum scans
+ will occur more often for all tables, starting with those that have
+ the oldest multixact-age. Both of these kinds of aggressive scans
+ will occur even if autovacuum is nominally disabled.
</para>
</sect3>
</sect2>