Re: [PROPOSAL] VACUUM Progress Checker.

From: "Syed, Rahila" <Rahila(dot)Syed(at)nttdata(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: "PostgreSQL-development (pgsql-hackers(at)postgresql(dot)org)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Date: 2015-09-15 14:35:55
Message-ID: C3C878A2070C994B9AE61077D46C38468883EE7A@MAIL703.KDS.KEANE.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 actually scanned.
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 newly loaded.

>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 this can 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 reached 100
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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-09-15 14:38:53 Re: Small typo in timeline.h regarding the meaning of infinity for timeline history entry
Previous Message Jesper Pedersen 2015-09-15 14:27:45 Additional LWLOCK_STATS statistics