summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2020-03-23 22:19:56 -0700
committerAndres Freund <andres@anarazel.de>2020-03-23 22:53:22 -0700
commitcedffbdb8b137325a79e07a976457bc2314adf9b (patch)
treee46e13b8808a596ced17dcbefee4ccfc20793096 /src/backend/commands
parent496ee647ecd2917369ffcf1eaa0b2cdca07c8730 (diff)
Report wait event for cost-based vacuum delay.
Author: Justin Pryzby Discussion: https://postgr.es/m/20200321040750.GD13662@telsasoft.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/vacuum.c2
1 files changed, 2 insertions, 0 deletions
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;