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

From Jim Nasby
Subject Re: [PROPOSAL] VACUUM Progress Checker.
Date
Msg-id 55AE8A29.40802@BlueTreble.com
Whole thread Raw
In response to Re: [PROPOSAL] VACUUM Progress Checker.  ("Thakur, Sameer" <Sameer.Thakur@nttdata.com>)
Responses Re: [PROPOSAL] VACUUM Progress Checker.
List pgsql-hackers
On 7/20/15 4:32 AM, Thakur, Sameer wrote:
> Hello,
>> Does this actually handle multiple indexes? It doesn't appear so, which I'd think is a significant problem... :/
> Please find v2 attached which does this.

I think it'd be better to combine both numbers into one report:

elog(WARNING,"Current/Overall index percentage completion %f/%f", 
current_index_progress * 100, all_index_progress);

It'd also be good to standardize on where the * 100 is happening.

Also, AFAIK:

(itemptr->ip_blkid.bi_hi != vacrelstats->last_scanned_page.bi_hi) || 
(itemptr->ip_blkid.bi_lo != vacrelstats->last_scanned_page.bi_lo)

can be replaced by

(itemptr->ipblkid != vacrelstats->last_scanned_page)

and

vacrelstats->current_index_scanned_page_count = 
vacrelstats->current_index_scanned_page_count + 1;

can simply be

vacrelstats->current_index_scanned_page_count++;
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Selectivity estimation for intarray with @@
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] postgres_fdw extension support