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

From Jim Nasby
Subject Re: [PROPOSAL] VACUUM Progress Checker.
Date
Msg-id 56550B03.3090901@BlueTreble.com
Whole thread Raw
In response to Re: [PROPOSAL] VACUUM Progress Checker.  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [PROPOSAL] VACUUM Progress Checker.  (Rahila Syed <rahilasyed90@gmail.com>)
List pgsql-hackers
On 11/24/15 7:02 PM, Amit Langote wrote:
>> 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.

True, but in cases where you care about monitoring a vacuum I suspect 
it'll be close enough.

Might be worth a little extra effort to handle the 0 case though. If you 
really wanted to get fancy you could see how the current heap 
tuples/page count compares to reltuples/relpages from pg_class for the 
heap... but I suspect that's pretty serious overkill.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

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