From: | Rahila Syed <rahilasyed90(at)gmail(dot)com> |
---|---|
To: | "Syed, Rahila" <Rahila(dot)Syed(at)nttdata(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PROPOSAL] VACUUM Progress Checker. |
Date: | 2015-07-15 20:18:44 |
Message-ID: | CAH2L28vfe+DAN94G=9nE-JGuLAyk6FetwWRpeWvWOw2Ur_uWDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
Please find attached updated patch with an interface to calculate command
progress in pgstat.c. This interface currently implements VACUUM progress
tracking .
A column named percent_complete has been added in pg_stat_activity to
report progress.
VACUUM calls the progress calculation interface periodically at an interval
specified by pgstat_track_progress GUC in ms.
Progress calculation can be disabled by setting pgstat_track_progress as
-1.
Remaining_time for VACUUM is not included in current patch to avoid
cluttering pg_stat_activity with too many columns.
But the estimate as seen from previous implementation seems reasonable
enough to be included in progress information , may be as an exclusive view
for vacuum progress information.
GUC parameter 'pgstat_track_progress' is currently PGC_SUSET in line with
'track_activities' GUC parameter. Although IMO, pgstat_track_progress can
be made PGC_USERSET in order to provide more flexibility to any user to
enable/disable progress calculation provided progress is tracked only if
track_activities GUC parameter is enabled.
In this patch, index scans are not taken into account for progress
calculation as of now .
Thank you,
Rahila Syed.
Attachment | Content-Type | Size |
---|---|---|
Vacuum_progress_checker_v1.patch | application/octet-stream | 10.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-07-15 20:32:23 | Re: assessing parallel-safety |
Previous Message | Robert Haas | 2015-07-15 19:30:15 | Re: patch : Allow toast tables to be moved to a different tablespace |