diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-23 20:07:33 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-23 20:07:33 +0000 |
commit | ea72d37ff727db8c7393990dd483e287dcb75b25 (patch) | |
tree | 14616629f9f8e157724565696ca3d55eb930770a /src | |
parent | 1b3d400cac138c12dd3d1428a9da112b69ad0f15 (diff) | |
download | postgresql-ea72d37ff727db8c7393990dd483e287dcb75b25.tar.gz postgresql-ea72d37ff727db8c7393990dd483e287dcb75b25.zip |
Make autovacuum report the start time of its current activity in
pg_stat_activity. Per gripe from Jim Nasby.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/autovacuum.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index ab77f004093..8866f287ca1 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -55,7 +55,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.58 2007/09/12 22:14:59 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.59 2007/09/23 20:07:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2576,7 +2576,7 @@ autovacuum_do_vac_analyze(Oid relid, bool dovacuum, bool doanalyze, * equivalent command was to be issued manually. * * Note we assume that we are going to report the next command as soon as we're - * done with the current one, and exiting right after the last one, so we don't + * done with the current one, and exit right after the last one, so we don't * bother to report "<IDLE>" or some such. */ static void @@ -2611,6 +2611,9 @@ autovac_report_activity(VacuumStmt *vacstmt, Oid relid) " %s.%s", nspname, relname); } + /* Set statement_timestamp() to current time for pg_stat_activity */ + SetCurrentStatementStartTimestamp(); + pgstat_report_activity(activity); } |