Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea72d37

Browse files
committed
Make autovacuum report the start time of its current activity in
pg_stat_activity. Per gripe from Jim Nasby.
1 parent1b3d400 commitea72d37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/postmaster/autovacuum.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*
5656
*
5757
* IDENTIFICATION
58-
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.58 2007/09/12 22:14:59 alvherre Exp $
58+
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.59 2007/09/23 20:07:33 tgl Exp $
5959
*
6060
*-------------------------------------------------------------------------
6161
*/
@@ -2576,7 +2576,7 @@ autovacuum_do_vac_analyze(Oid relid, bool dovacuum, bool doanalyze,
25762576
* equivalent command was to be issued manually.
25772577
*
25782578
* Note we assume that we are going to report the next command as soon as we're
2579-
* done with the current one, andexiting right after the last one, so we don't
2579+
* done with the current one, andexit right after the last one, so we don't
25802580
* bother to report "<IDLE>" or some such.
25812581
*/
25822582
staticvoid
@@ -2611,6 +2611,9 @@ autovac_report_activity(VacuumStmt *vacstmt, Oid relid)
26112611
" %s.%s",nspname,relname);
26122612
}
26132613

2614+
/* Set statement_timestamp() to current time for pg_stat_activity */
2615+
SetCurrentStatementStartTimestamp();
2616+
26142617
pgstat_report_activity(activity);
26152618
}
26162619

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp