public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bruce Momjian <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: 24.1.5.1. Multixacts And Wraparound
Date: Thu, 24 Jun 2021 15:53:29 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
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.
Attachments:
[text/x-diff] mxact.diff (1.4K, 2-mxact.diff)
download | inline diff:
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>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: 24.1.5.1. Multixacts And Wraparound
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox