pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust VACUUM's removable cutoff log message.
Date: Fri, 15 Apr 2022 20:23:40 +0000
Message-ID: <E1nfSTk-000fy9-Rk@gemulon.postgresql.org> (raw)

Adjust VACUUM's removable cutoff log message.

The age of OldestXmin (a.k.a. "removable cutoff") when VACUUM ends often
indicates the approximate number of XIDs consumed while VACUUM ran.
However, there is at least one important exception: the cutoff could be
held back by a snapshot that was acquired before our VACUUM even began.
Successive VACUUM operations may even use exactly the same old cutoff in
extreme cases involving long held snapshots.

The log messages that described how removable cutoff aged (which were
added by commit 872770fd) created the impression that we were reporting
on how VACUUM's usable cutoff advanced while VACUUM ran, which was
misleading in these extreme cases.  Fix by using a more general wording.

Per gripe from Tom Lane.

In passing, relocate related instrumentation code for clarity.

Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/1643035.1650035653@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/357c8455e64915f2d8f50ca5853eb91b74470d96

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)



Message-ID: <E1nfSTk-000fy9-Rk@gemulon.postgresql.org>
Permalink:  ../E1nfSTk-000fy9-Rk@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nfSTk-000fy9-Rk@gemulon.postgresql.org

 · 

reply

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: Adjust VACUUM's removable cutoff log message.
  In-Reply-To: <E1nfSTk-000fy9-Rk@gemulon.postgresql.org>
  References: <E1nfSTk-000fy9-Rk@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