Please find attached updated VACUUM progress checker patch. Following have been accomplished in the patch
1. Accounts for index pages count while calculating total progress of VACUUM. 2. Common location for storing progress parameters for any command. Idea is every command which needs to report progress can populate and interpret the shared variables in its own way. Each can display progress by implementing separate views. 3. Separate VACUUM progress view to display various progress parameters has been implemented . Progress of various phases like heap scan, index scan, total pages scanned along with completion percentage is reported. 4.This view can display progress for all active backends running VACUUM.
Basic testing has been performed. Thorough testing is yet to be done. Marking it as Needs Review in Sept-Commitfest.
ToDo: Display count of heap pages actually vacuumed(marking line pointers unused) Display percentage of work_mem being used to store dead tuples.