From cedffbdb8b137325a79e07a976457bc2314adf9b Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 23 Mar 2020 22:19:56 -0700 Subject: Report wait event for cost-based vacuum delay. Author: Justin Pryzby Discussion: https://postgr.es/m/20200321040750.GD13662@telsasoft.com --- src/backend/commands/vacuum.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/commands') diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index d625d17bf46..59731d687f6 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -2019,7 +2019,9 @@ vacuum_delay_point(void) if (msec > VacuumCostDelay * 4) msec = VacuumCostDelay * 4; + pgstat_report_wait_start(WAIT_EVENT_VACUUM_DELAY); pg_usleep((long) (msec * 1000)); + pgstat_report_wait_end(); VacuumCostBalance = 0; -- cgit v1.2.3