Thread: pgsql: Adjust VACUUM's removable cutoff log message.

pgsql: Adjust VACUUM's removable cutoff log message.

From
Peter Geoghegan
Date:
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(-)