From: Simon Riggs Date: Tue, 6 Sep 2016 14:35:47 +0000 (+0100) Subject: Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL X-Git-Tag: REL_10_BETA1~1767 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcb12ce8d8691e0e526d3f38d14c4d7fc9c664f5;p=thirdparty%2Fpostgresql.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 231e92d8e46..b5fb3250071 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -1747,7 +1747,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats) return; } - pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL); + pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL * 1000L); } /*