Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit
Date
Msg-id 20070607155336.GM3664@alvh.no-ip.org
Whole thread Raw
Responses Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-patches by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: contrib/pgstattuple Japanese documentation fix
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit