Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
authorSimon Riggs
Fri, 9 Sep 2016 10:43:46 +0000 (11:43 +0100)
committerSimon Riggs
Fri, 9 Sep 2016 10:43:46 +0000 (11:43 +0100)
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

src/backend/commands/vacuumlazy.c

index 24298894fae10e9fdcc156eb3161b9dd6730af74..64626edf702bb2e8c406c91d61236da2438a58d6 100644 (file)
@@ -1484,7 +1484,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
                return;
            }
 
-           pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL);
+           pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL * 1000L);
        }
 
        /*