From 16522314fa4b612c5192b750e8f030084df0a387 Mon Sep 17 00:00:00 2001 From: Pengzhou Tang Date: Wed, 17 Jul 2019 00:19:44 -0400 Subject: [PATCH] Use the correct time unit in BackoffSweeper backend Commit bfd1f46cdca853 used the wrong time unit (expect Ms, passed with Us) in BackoffSweeper backend which makes it cannot re-calculate the CPU shares in time and the normal backends will sleep more CPU ticks than before in CHECK_FOR_INTERRUPTS and cause a performance downgrade. --- src/backend/postmaster/backoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/postmaster/backoff.c b/src/backend/postmaster/backoff.c index 86d3c55602..42c1ca9991 100644 --- a/src/backend/postmaster/backoff.c +++ b/src/backend/postmaster/backoff.c @@ -1208,7 +1208,7 @@ BackoffSweeperLoop(void) /* Sleep a while. */ rc = WaitLatch(&MyProc->procLatch, WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH, - gp_resqueue_priority_sweeper_interval * 1000L); + gp_resqueue_priority_sweeper_interval); ResetLatch(&MyProc->procLatch); /* emergency bailout if postmaster has died */ -- GitLab