Re: pgsql: Add relallfrozen to pg_class

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add relallfrozen to pg_class
Date: 2025-03-03 16:48:18
Message-ID: CAAKRu_Z_W+Fc92onBM7LmeFs0+Dcu4A7K_e5m6LMMn9biV+_xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Mar 3, 2025 at 11:44 AM Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2025-Mar-03, Melanie Plageman wrote:
>
> > 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.

We use relpages and reltuples from pg_class in
relation_needs_vacanalyze() in the same way relallfrozen is being used
here.

If we don't want relallfrozen in pg_class then there is no reason we
wouldn't also move relallvisible out of pg_class too.

- Melanie

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2025-03-03 16:50:21 Re: pgsql: Add relallfrozen to pg_class
Previous Message Álvaro Herrera 2025-03-03 16:44:54 Re: pgsql: Add relallfrozen to pg_class