Re: pgsql: Add per-index stats information in verbose logs of autovacuum - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: pgsql: Add per-index stats information in verbose logs of autovacuum
Date
Msg-id CAH2-WzkYgHZzpGOwR14CScJsjaQpvJrEkEfkh_=wGhzLb=yVdQ@mail.gmail.com
Whole thread Raw
In response to pgsql: Add per-index stats information in verbose logs of autovacuum  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: Add per-index stats information in verbose logs of autovacuum  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
On Mon, Mar 22, 2021 at 9:28 PM Michael Paquier <michael@paquier.xyz> wrote:
> Add per-index stats information in verbose logs of autovacuum

I think that this is very helpful -- thanks for working on it.
However, it seems to me that "%u remain" is misleading. I am referring
to this line of output:

        index "dups_idx": pages: 1431 remain, 1343 newly deleted, 1427
currently deleted, 84 reusable

It suggests that the index file can shrink. As if the remaining pages
are left now that the pages we deleted have been returned to the OS. I
think that this same line of output should look like this instead:

        index "dups_idx": 1431 pages in total, 1343 newly deleted,
1427 currently deleted, 84 reusable

FWIW this is roughly the corresponding point of equivalent VACUUM
VERBOSE output:

INFO:  index "dups_idx" now contains 0 row versions in 1431 pages

To be clear, I agree that it would not be sensible to make the
log_autovacuum_min_duration output 100% consistent with VACUUM
VERBOSE. I just think that "%u remain" is misleading. It's just that
one detail.


--
Peter Geoghegan



pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add per-index stats information in verbose logs of autovacuum
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Add per-index stats information in verbose logs of autovacuum