>In case of vacuum, 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. This can be followed by additional individual phase information. Following fields common across different commands can be used to display progress Command work done total work percent complete message VACUUM x y z total progress u v w phase 1 The command code can be divided into distinct phases and each phase progress can be represented separately. With a summary of entire command progress as the first entry. The summary can be the summation of individual phase entries. If the phase repeats during command execution the previous entry for the phase will be replaced.(for ex. index scan in vacuum) >Essential information has one numeric data, which is stored >essentially information regarding of its processing. We may need more than one numeric data as mentioned above to represent scanned blocks versus total blocks. >Additional information has two data: text and numeric. These data is >free-style data which is stored by each backend as it like. If I understand your point correctly, I think you are missing following, The amount of additional information for each command can be different. We may need an array of text and numeric data to represent more additional information. Thank you, Rahila Syed