1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Report wait event for cost-based vacuum delay.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20200321040750.GD13662@telsasoft.com
This commit is contained in:
Andres Freund
2020-03-23 22:19:56 -07:00
parent 496ee647ec
commit cedffbdb8b
4 changed files with 9 additions and 1 deletions

View File

@ -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;