From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4 Description of problem: If I run pg_autovacuum with sleep base value option greater then 2200 its checking interval is to small. Version-Release number of selected component (if applicable): 8.0.3-1 How reproducible: Always Steps to Reproduce: 1. Check if: stats_start_collector = true stats_row_level = true are set in postgresql.conf 2. Run: pg_autovacuum -s 3600 -d 2 Actual Results: You will see that autovacuum runs almost continously. It prints that it will wait for 3600 secs but it doesn't wait at all! Expected Results: Autovacuum should run every 3600 secs (or any other given time). Additional info: Observed wait time is different for different option values. For example for 2200, 2500, 3600 it doesn't wait at all. But for 5000 secs it waits for about 720 secs.
Yeah, the call to pg_usleep overflows at 2147 seconds. This is fixed for Postgres 8.1. In the meantime, use a value of 2000 seconds ...