Re: fillfactor hides autovacuum parameters in 8.4.0

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: fillfactor hides autovacuum parameters in 8.4.0
Date: 2009-08-18 19:43:42
Message-ID: 4A8B046E.7030003@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-08-18 21:25:37 Re: Bad interval conversion?
Previous Message Tom Lane 2009-08-18 19:41:39 Re: Bad interval conversion?

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-08-18 20:17:23 Re: "make install" now tries to build the documentation
Previous Message Tom Lane 2009-08-18 19:13:57 Re: "make install" now tries to build the documentation