Re: pgsql: Add relallfrozen to pg_class - Mailing list pgsql-committers

From Álvaro Herrera
Subject Re: pgsql: Add relallfrozen to pg_class
Date
Msg-id 202503031644.nihftaytey2b@alvherre.pgsql
Whole thread Raw
In response to pgsql: Add relallfrozen to pg_class  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: pgsql: Add relallfrozen to pg_class
Re: pgsql: Add relallfrozen to pg_class
List pgsql-committers
On 2025-Mar-03, Melanie Plageman wrote:

> Add relallfrozen to pg_class
> 
> Add relallfrozen, an estimate of the number of pages marked all-frozen
> in the visibility map.
> 
> pg_class already has relallvisible, an estimate of the number of pages
> in the relation marked all-visible in the visibility map. This is used
> primarily for planning.
> 
> relallfrozen, together with relallvisible, is useful for estimating the
> outstanding number of all-visible but not all-frozen pages in the
> relation for the purposes of scheduling manual VACUUMs and tuning vacuum
> freeze parameters.

I'm confused about this.  Why was the new value added to pg_class
instead of to the pgstat system?  I don't think relallvisible is a good
precedent, because as you write here, that one is used for planning,
which has different requirements.  For vacuuming metrics we rely on
pgstat.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"El número de instalaciones de UNIX se ha elevado a 10,
y se espera que este número aumente" (UPM, 1972)



pgsql-committers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: pgsql: Set amcancrosscompare to true for hash
Next
From: Melanie Plageman
Date:
Subject: Re: pgsql: Add relallfrozen to pg_class