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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-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

Browse pgsql-bugs by date

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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-05-31 17:12:26 Re: Regression tests
Previous Message Heikki Linnakangas 2007-05-31 08:08:59 Re: Synchronized Scan WIP patch