Re: [PROPOSAL] VACUUM Progress Checker. - Mailing list pgsql-hackers

From Amit Langote
Subject Re: [PROPOSAL] VACUUM Progress Checker.
Date
Msg-id 5655089E.2050305@lab.ntt.co.jp
Whole thread Raw
In response to Re: [PROPOSAL] VACUUM Progress Checker.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: [PROPOSAL] VACUUM Progress Checker.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On 2015/11/25 9:32, Jim Nasby wrote:
> On 11/24/15 2:02 AM, Amit Langote wrote:
>> Just to clarify, does this mean we report index vacuum progress in terms
>> of index items processed (not pages)? If so, how do we get total number of
>> index items to process (presumably across all indexes) for a given phase 2
>> round? As a context, we'd report phase 1 progress in terms of heap pages
>> processed of total heap pages.
> 
> You'd get it from pg_class.reltuples for each index. Since all index
> vacuuming is done strictly on a per-index-tuple basis, that's probably the
> most accurate way to do it anyway.

Important to remember though that the reltuples would be latest as of the
last VACUUM/ANALYZE.

> Also, while it might be interesting to look at the total number of index
> tuples, I think it's probably best to always report on a per-index basis,
> as well as which index is being processed. I suspect there could be a very
> large variance of tuple processing speed for different index types.
> Eventually it might be worth it to allow index AMs to provide their own
> vacuuming feedback, but I think that's way out of scope for this patch. :)

Agreed.

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Using quicksort for every external sort run
Next
From: Jim Nasby
Date:
Subject: Re: parallelism and sorting