From: Simon Riggs Date: Fri, 9 Sep 2016 10:46:03 +0000 (+0100) Subject: Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL X-Git-Tag: REL9_1_24~23 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3ed7f54bc46ab2bb39b703b40bc72693c7f1306f;p=postgresql.git Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL lazy_truncate_heap() was waiting for VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL, but in microseconds not milliseconds as originally intended. Found by code inspection. Simon Riggs --- diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 25278025b0d..c92f722dde1 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -1163,7 +1163,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats) return; } - pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL); + pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL * 1000L); } /*