Re: Eagerly scan all-visible pages to amortize aggressive vacuum - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Eagerly scan all-visible pages to amortize aggressive vacuum
Date
Msg-id CA+Tgmobk5iEtCDEmx1txi2ZQMujRiYoB6S-hrPSactFtexoyZg@mail.gmail.com
Whole thread Raw
In response to Re: Eagerly scan all-visible pages to amortize aggressive vacuum  (Robert Treat <rob@xzilla.net>)
List pgsql-hackers
On Sun, Jan 26, 2025 at 3:11 PM Robert Treat <rob@xzilla.net> wrote:
> Hmm... isn't "don't try" really more logically equivalent to "stop
> after zero failures", with "try until zero failures" more of the
> inverse... more like "never stop never stopping"?

No. Or at least, I don't think that's how English works.

> So that middle bit is trying to act as glue that pulls this all
> together. I thought the previous version was closer, with Haas's
> feedback I might go with something more like this:
>
>     <para>
> -    <command>VACUUM</command> normally only scans pages that have been modified
> -    since the last vacuum, but
> <structfield>relfrozenxid</structfield> can only be
> -    advanced when every page of the table
> -    that might contain unfrozen XIDs is scanned.  This happens when
> +    While <command>VACUUM</command> typically scans pages that have been
> +    modified since the last vacuum, it may also eagerly scan some
> all-visible but not
> +    all-frozen pages in an attempt to freeze them, but the
> +    <structfield>relfrozenxid</structfield> will only be advanced when
> +    every page of the table that might contain unfrozen XIDs is scanned.
> +    This happens when

I like that.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export
Next
From: Sami Imseih
Date:
Subject: Re: POC: track vacuum/analyze cumulative time per relation