Bug 163733 - pg_autovacuum wrongly interprets sleep base value option
Summary: pg_autovacuum wrongly interprets sleep base value option
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 4
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-20 18:31 UTC by Michal Piotrowski
Modified: 2013-07-03 03:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-20 19:21:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Piotrowski 2005-07-20 18:31:30 UTC
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.

Comment 1 Tom Lane 2005-07-20 19:21:43 UTC
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 ...


Note You need to log in before you can comment on or make changes to this bug.