pgsql: Add per-index stats information in verbose logs of autovacuum

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add per-index stats information in verbose logs of autovacuum
Date: 2021-03-23 04:28:06
Message-ID: E1lOYeE-0001Wg-Kj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add per-index stats information in verbose logs of autovacuum

Once a relation's autovacuum is completed, the logs include more
information about this relation state if the threshold of
log_autovacuum_min_duration (or its relation option) is reached, with
for example contents about the statistics of the VACUUM operation for
the relation, WAL and system usage.

This commit adds more information about the statistics of the relation's
indexes, with one line of logs generated for each index. The index
stats were already calculated, but not printed in the context of
autovacuum yet. While on it, some refactoring is done to keep track of
the index statistics directly within LVRelStats, simplifying some
routines related to parallel VACUUMs.

Author: Masahiko Sawada
Reviewed-by: Michael Paquier, Euler Taveira
Discussion: https://postgr.es/m/CAD21AoAy6SxHiTivh5yAPJSUE4S=QRPpSZUdafOSz0R+fRcM6Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5aed6a1fc214913de9ac69c1717dc64a2483e16d

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 133 +++++++++++++++++++++--------------
1 file changed, 81 insertions(+), 52 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-03-23 05:36:03 Re: pgsql: Add per-index stats information in verbose logs of autovacuum
Previous Message tsunakawa.takay@fujitsu.com 2021-03-23 04:27:12 RE: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode