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

From Syed, Rahila
Subject Re: [PROPOSAL] VACUUM Progress Checker.
Date
Msg-id C3C878A2070C994B9AE61077D46C38468883EE7A@MAIL703.KDS.KEANE.COM
Whole thread Raw
In response to Re: [PROPOSAL] VACUUM Progress Checker.  (Thom Brown <thom@linux.com>)
Responses Re: [PROPOSAL] VACUUM Progress Checker.  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
Hello Thom,

>Okay, I've just tested this with a newly-loaded table (1,252,973 of jsonb data),
Thanks a lot!

>but after it's finished, I end up with this:
>json=# select * from pg_stat_vacuum_progress;
>-[ RECORD 1 ]-------+-------
>pid                 | 5569
>total_pages         | 217941
>scanned_pages       | 175243
>total_heap_pages    | 175243
>scanned_heap_pages  | 175243
>total_index_pages   | 42698
>scanned_index_pages |
>percent_complete    | 80
>This was running with a VACUUM ANALYZE.  This output seems to suggest that it didn't complete.

Ok. The patch fails here because 'total pages to be scanned' takes into account index pages and no index pages are
actuallyscanned.  
So the scanned pages count does not reach total pages count . I will fix this.
It seems that no index pages were scanned during this  because there were no dead tuples to be cleaned as the table was
newlyloaded. 

>After, I ran VACUUM FULL.  pg_stat_vacuum_progress didn't change from before, so that doesn't appear to show up in the
view.
The scope of this patch is to report progress of basic VACUUM . It does not take into account VACUUM FULL yet.  I think
thiscan be included after basic VACUUM progress is done. 

>I then deleted 40,000 rows from my table, and ran VACUUM ANALYZE again.  This time it progressed and percent_complete
reached100 
OK.

Thank you,
Rahila Syed.


______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.

pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Additional LWLOCK_STATS statistics
Next
From: Fujii Masao
Date:
Subject: Re: Small typo in timeline.h regarding the meaning of infinity for timeline history entry