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

From Rahila Syed
Subject Re: [PROPOSAL] VACUUM Progress Checker.
Date
Msg-id CAH2L28syRAfHLoF=zQCbw0ArL0Nkf05LCmekgNNp2KFd1HCEsg@mail.gmail.com
Whole thread Raw
In response to Re: [PROPOSAL] VACUUM Progress Checker.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
>The total number of heap pages is known, and the total number of index
>pages is also known, so it's possible to derive a percentage out of
>this part.

The total number of index pages scanned during entire vacuum will depend on number 
of index scans that happens.
In order to extrapolate percent complete for phase two(index scan) we need number of index scans * total index pages.
The number of index scans can vary from 1 to n (n depending on maintenance_work_mem)

Summarizing suggestions in previous mails, following information can be reported
Phase 1.heap pages scanned / total heap pages   
Phase 2.index pages scanned / total index pages (across all indexes)
Phase 3.count of heap pages vacuumed

Additional info like number of index scans so far, number of dead tuples being vacuumed in one batch can also be provided. 

A combined estimate for vacuum percent complete can be provided by summing up heap pages scanned, index pages scanned against total heap pages, total index pages * number of index scans. 

Thank you,
Rahila Syed


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Re: Using quicksort and a merge step to significantly improve on tuplesort's single run "external sort"
Next
From: Tom Lane
Date:
Subject: Re: Foreign join pushdown vs EvalPlanQual