Re: [PROPOSAL] VACUUM Progress Checker.

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, <pokurev(at)pm(dot)nttdata(dot)co(dot)jp>, "Robert Haas (robertmhaas(at)gmail(dot)com)" <robertmhaas(at)gmail(dot)com>
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Date: 2015-11-25 01:12:35
Message-ID: 56550B03.3090901@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-11-25 01:24:22 Re: Using quicksort for every external sort run
Previous Message Jim Nasby 2015-11-25 01:02:58 Re: parallelism and sorting