Skip site navigation (1) Skip section navigation (2)

BUG #3326: Invalid lower bound of autovacuum_cost_limit

From: "Galy Lee" <lee(dot)galy(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3326: Invalid lower bound of autovacuum_cost_limit
Date: 2007-05-31 09:14:06
Message-ID: 200705310914.l4V9E6JA094603@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackerspgsql-patches
The following bug has been logged online:

Bug reference:      3326
Logged by:          Galy Lee
Email address:      lee(dot)galy(at)oss(dot)ntt(dot)co(dot)jp
PostgreSQL version: 8.3
Operating system:   Red Hat 4.
Description:        Invalid lower bound of autovacuum_cost_limit
Details: 

Hello

I found some bugs which relative to the autovacuum_cost_limit GUC
parameter.

* Bug-1:  Invalid lower bound of autovacuum_cost_limit

autovacuum_vacuum_cost_limit should be the following value:
  autovacuum_vacuum_cost_limit = -1, or [1, 10000]
  (0 should be prohibited. )

But 0 can also be accepted for autovacuum_vacuum_cost_limit now.

This causes zero-division error for autovacuum:

   ERROR:  floating-point exception
   DETAIL:  An invalid floating-point operation was signaled. This
   probably means an out-of-range result or an invalid operation,
   such as division by zero.

* Bug-2: 0-cost-limit for autovacuum worker

When autovacuum_max_workers > autovacuum_vacuum_cost_limit, the above
zero-division error also happened.

* Bug-3: no GUC constrain check for pg_autovacuum

The settings in pg_autovacuum are not checked enough now. Invalid value
can be passed to autovacuum, this also causes some columns in
pg_autovacuum has inconsistent upper and lower bound with their original
GUC constrain.

 pg_autovacuum colum | definition |  GUC constrain
 --------------------+------------+--------------------------
 vac_base_thresh     | integer    |  [0, INT_MAX]
 vac_scale_factor    | real       |  [0.0, 100.0]
 anl_base_thresh     | integer    |  [0, INT_MAX]
 anl_scale_factor    | real       |  [0.0, 100.0]
 vac_cost_delay      | integer    |  [-1, 1000]
 vac_cost_limit      | integer    |  [-1, 10000]
 freeze_min_age      | integer    |  [0, 1000000000]
 freeze_max_age      | integer    |  [100000000, 2000000000]

The above table shows the wrong mapping between pg_autovacuum columns
and GUC constrain.

Responses

pgsql-hackers by date

Next:From: Zdenek KotalaDate: 2007-05-31 10:31:44
Subject: Re: Backend crash during explain
Previous:From: Heikki LinnakangasDate: 2007-05-31 09:11:30
Subject: Re: [COMMITTERS] pgsql: Make large sequential scans and VACUUMs work in a limited-size

pgsql-bugs by date

Next:From: JohndhihjDate: 2007-05-31 12:41:11
Subject: BUG #3327: Hi great site great work thank you!
Previous:From: Eduardo FerreiraDate: 2007-05-31 03:10:31
Subject: Re: BUG #3323: Wrong charset for the lower and upper functions

pgsql-patches by date

Next:From: Magnus HaganderDate: 2007-05-31 17:12:26
Subject: Re: Regression tests
Previous:From: Heikki LinnakangasDate: 2007-05-31 08:08:59
Subject: Re: Synchronized Scan WIP patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group