From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add relallfrozen to pg_class |
Date: | 2025-03-03 16:20:54 |
Message-ID: | E1tp8XG-000baq-1b@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
A future commit will use relallfrozen to trigger more frequent vacuums
on insert-focused workloads with significant volume of frozen data.
Bump catalog version
Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Robert Treat <rob(at)xzilla(dot)net>
Reviewed-by: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Reviewed-by: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Discussion: https://postgr.es/m/flat/CAAKRu_aj-P7YyBz_cPNwztz6ohP%2BvWis%3Diz3YcomkB3NpYA--w%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/99f8f3fbbc8f743290844e8c676d39dad11c5d5d
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 20 ++++++
src/backend/access/heap/vacuumlazy.c | 18 ++++--
src/backend/catalog/heap.c | 2 +
src/backend/catalog/index.c | 12 +++-
src/backend/commands/analyze.c | 12 ++--
src/backend/commands/cluster.c | 5 ++
src/backend/commands/vacuum.c | 6 ++
src/backend/statistics/relation_stats.c | 29 +++++++--
src/backend/utils/cache/relcache.c | 2 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_class.h | 3 +
src/include/commands/vacuum.h | 1 +
src/test/regress/expected/stats_import.out | 99 +++++++++++++++++++-----------
src/test/regress/sql/stats_import.sql | 49 ++++++++++-----
14 files changed, 190 insertions(+), 70 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Melanie Plageman | 2025-03-03 16:44:02 | Re: pgsql: Set amcancrosscompare to true for hash |
Previous Message | Tomas Vondra | 2025-03-03 16:10:28 | pgsql: Allow parallel CREATE INDEX for GIN indexes |