Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Galy Lee <lee(dot)galy(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit
Date: 2007-06-07 15:53:36
Message-ID: 20070607155336.GM3664@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-patches

Galy Lee wrote:

Hi,

I'll deal with each issue separately.

> * 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 is solved easily by adding a check in an assign hook (attached).
The only remaining problem here is that other error messages could be
clearer.

So this is correct:

$ postmaster -c autovacuum_vacuum_cost_limit=0
17902 FATAL: invalid value for parameter "autovacuum_vacuum_cost_limit": 0

But this is misleading (started postmaster with good value, then edited
postgresql.conf and entered "-2"):

17903 LOG: received SIGHUP, reloading configuration files
17903 LOG: -2 is outside the valid range for parameter "autovacuum_vacuum_cost_limit" (-1 .. 1000)

Note how it still says the range is -1 .. 1000.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Attachment Content-Type Size
autovac-cost-limit-2.patch text/x-diff 1.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-06-07 16:18:44 Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit
Previous Message Alvaro Herrera 2007-06-07 01:56:45 Re: BUG #3326: Invalid lower bound of autovacuum_cost_limit

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-06-07 16:18:44 Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit
Previous Message Jim C. Nasby 2007-06-07 15:50:36 Re: Autovacuum launcher doesn't notice death of postmaster immediately

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-06-07 16:18:44 Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit
Previous Message Jim C. Nasby 2007-06-07 15:50:36 Re: Autovacuum launcher doesn't notice death of postmaster immediately