We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54bb91c commit 4753ef3Copy full SHA for 4753ef3
src/backend/commands/vacuum.c
@@ -2080,9 +2080,11 @@ vacuum_delay_point(void)
2080
if (msec > VacuumCostDelay * 4)
2081
msec = VacuumCostDelay * 4;
2082
2083
- pgstat_report_wait_start(WAIT_EVENT_VACUUM_DELAY);
2084
- pg_usleep((long) (msec * 1000));
2085
- pgstat_report_wait_end();
+ (void) WaitLatch(MyLatch,
+ WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
+ msec,
2086
+ WAIT_EVENT_VACUUM_DELAY);
2087
+ ResetLatch(MyLatch);
2088
2089
VacuumCostBalance = 0;
2090
0 commit comments