Re: 24.1.5.1. Multixacts And Wraparound - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: 24.1.5.1. Multixacts And Wraparound
Date
Msg-id 20210624195329.GB16214@momjian.us
Whole thread Raw
In response to Re: 24.1.5.1. Multixacts And Wraparound  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-docs
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  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.


Attachment

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Has the Update savepoint example outlived its usefulness?
Next
From: Peter Eisentraut
Date:
Subject: Re: change float4 to floating point about type of autovacuum_vacuum_insert_scale_factor