From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Rahila Syed <rahilasyed90(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PROPOSAL] VACUUM Progress Checker. |
Date: | 2015-08-18 05:15:36 |
Message-ID: | 55D2BF78.8010205@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8/17/15 5:07 PM, Rahila Syed wrote:
>>In case ofvacuum, I think we need to track the number of scanned heap
>>pages at least, and the information about index scan is the additional
>>information
>
> Actually the progress of heap pages scan depend on index scans. So
> complete VACUUM progress
> needs to have a count of index pages scanned too. So, progress can be
> calculated by measuring index_pages_scanned + heap_pages_scanned
> against total_index_pages + total_heap_pages. This can make essential
> information.
There's absolutely no way to get a reasonable status report in the case
of multiple index passes unless you somehow count the passes, especially
since index cleanup is frequently MUCH longer than the heap cleanup.
What should work is exporting the number of index passes we've already
made. If > 0 we know we're in a multiple scan situation. At the end of
each index pass, do index_passes++; index_pages=0; index_pages_scanned=0.
Personally, I think we should use SIGINFO to signal a backend to output
status data to a file in pg_stat_tmp/ (but not the main stats file) and
be done with it. That allows us to easily handle variable length stuff
with minimal fuss. No normal user is going to hammer away at that, and
anyone that's really worried about performance will have that directory
sitting on a ramdisk anyway.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-08-18 05:21:22 | Re: missing documentation for partial WAL files |
Previous Message | Kaare Rasmussen | 2015-08-18 05:11:15 | Re: jsonb array-style subscripting |