From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: VACUUM VERBOSE: Count "newly deleted" index pages.
Date: Thu, 25 Feb 2021 22:34:06 +0000
Message-ID: <E1lFPCw-0006pm-Mg@gemulon.postgresql.org> (raw)
VACUUM VERBOSE: Count "newly deleted" index pages.
Teach VACUUM VERBOSE to report on pages deleted by the _current_ VACUUM
operation -- these are newly deleted pages. VACUUM VERBOSE continues to
report on the total number of deleted pages in the entire index (no
change there). The former is a subset of the latter.
The distinction between each category of deleted index page only arises
with index AMs where page deletion is supported and is decoupled from
page recycling for performance reasons.
This is follow-up work to commit e5d8a999, which made nbtree store
64-bit XIDs (not 32-bit XIDs) in pages at the point at which they're
deleted. Note that the btm_last_cleanup_num_delpages metapage field
added by that commit usually gets set to pages_newly_deleted. The
exceptions (the scenarios in which they're not equal) all seem to be
tricky cases for the implementation (of page deletion and recycling) in
general.
Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-WznpdHvujGUwYZ8sihX%3Dd5u-tRYhi-F4wnV2uN2zHpMUXw%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2376361839091b0dcdcc0b77f938b809b5f21646
Modified Files
--------------
src/backend/access/gin/ginvacuum.c | 1 +
src/backend/access/gist/gistvacuum.c | 19 ++++++++++--
src/backend/access/heap/vacuumlazy.c | 4 ++-
src/backend/access/nbtree/nbtpage.c | 54 +++++++++++++++++++----------------
src/backend/access/nbtree/nbtree.c | 33 ++++++++-------------
src/backend/access/spgist/spgvacuum.c | 1 +
src/include/access/genam.h | 10 +++++--
src/include/access/nbtree.h | 16 ++++++++++-
8 files changed, 85 insertions(+), 53 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie
Subject: Re: pgsql: VACUUM VERBOSE: Count "newly deleted" index pages.
In-Reply-To: <E1lFPCw-0006pm-Mg@gemulon.postgresql.org>
References: <E1lFPCw-0006pm-Mg@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox