Re: [PROPOSAL] VACUUM Progress Checker.

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: "Thakur, Sameer" <Sameer(dot)Thakur(at)nttdata(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Date: 2015-07-21 18:06:33
Message-ID: 55AE8A29.40802@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-07-21 18:07:24 Re: [PATCH] postgres_fdw extension support
Previous Message Heikki Linnakangas 2015-07-21 18:01:54 Re: Selectivity estimation for intarray with @@