Re: fillfactor hides autovacuum parameters in 8.4.0 - Mailing list pgsql-bugs

From Euler Taveira de Oliveira
Subject Re: fillfactor hides autovacuum parameters in 8.4.0
Date
Msg-id 4A8B046E.7030003@timbira.com
Whole thread Raw
In response to fillfactor hides autovacuum parameters in 8.4.0  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-bugs
Itagaki Takahiro escreveu:
> In 8.4.0, we create StdRdOptions if a relation has some fields in
> pg_class.reloption. Then, unspecified fields are filled with the
> default values. The values are always hard-coded default values and
> don't reflect current GUC settings.
>
Hey, how I couldn't notice that. :(

> To fix the bug, each field in StdRdOptions should have "not-specified" flag.
> If not specified, autovacuum should use current GUC settings instead of
> reloptions. Is it possible to change the default values of reloptions
> to some magic number (-1 or so) ?
>
BTW, we agreed that magic numbers is a hack in pg_autovacuum and we wouldn't
use it in reloptions [1].

> There might be another idea that we fill StdRdOptions with current GUC
> settings instead of hard-coded default values. It looks cleaner, but
> we need to treat dynamic default values and invalidate reloptions
> if we reload settings.
>
+1. I'm afraid we need to touch too much code for a fix. Let's do it for 8.5.
I'll try to come up with a patch.

A not-so-invasive code is to transform all AutoVacOpts elements in pointers
and to leave the default assignment to relation_needs_vacanalyze(). If nobody
steps up I'll give it a stab later.


[1] http://archives.postgresql.org/pgsql-hackers/2009-02/msg00303.php


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bad interval conversion?
Next
From: Tom Lane
Date:
Subject: Re: Bad interval conversion?