]> granicus.if.org Git - postgresql/commitdiff
Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
authorSimon Riggs <simon@2ndQuadrant.com>
Fri, 9 Sep 2016 10:44:54 +0000 (11:44 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Fri, 9 Sep 2016 10:44:54 +0000 (11:44 +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 3778d9d4250b2e93acb2d669f855c57f67ed8129..50085f9a54230af548e33ae1fc94e8657b13d268 100644 (file)
@@ -1448,7 +1448,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
                                return;
                        }
 
-                       pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL);
+                       pg_usleep(VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL * 1000L);
                }
 
                /*