Hello, Thank you for your comments. Please find attached patch addressing following comments.
>As I might have written upthread, transferring the whole string >as a progress message is useless at least in this scenario. Since >they are a set of fixed messages, each of them can be represented >by an identifier, an integer number. I don't see a reason for >sending the whole of a string beyond a backend. Agreed. I used following macros. #define VACUUM_PHASE_SCAN_HEAP 1 #define VACUUM_PHASE_VACUUM_INDEX_HEAP 2 >I guess num_index_scans could better be reported after all the indexes are >done, that is, after the for loop ends. Agreed. I have corrected it. > CREATE VIEW pg_stat_vacuum_progress AS > SELECT S.s[1] as pid, > S.s[2] as relid, > CASE S.s[3] > WHEN 1 THEN 'Scanning Heap' > WHEN 2 THEN 'Vacuuming Index and Heap' > ELSE 'Unknown phase' > END, > .... > FROM pg_stat_get_command_progress(PROGRESS_COMMAND_VACUUM) as S; > > # The name of the function could be other than *_command_progress. The name of function is updated as pg_stat_get_progress_info() and also updated the function. Updated the pg_stat_vacuum_progress view as suggested. Regards, Vinayak
Vacuum_progress_checker_v12.patch
Description: Vacuum_progress_checker_v12.patch
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers