Re: fillfactor gets set to zero for toast tables - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: fillfactor gets set to zero for toast tables
Date
Msg-id 20100526163256.B28E.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: fillfactor gets set to zero for toast tables  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: fillfactor gets set to zero for toast tables
Re: fillfactor gets set to zero for toast tables
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> wrote:

> Excerpts from Tom Lane's message of vie may 14 15:03:57 -0400 2010:
>
> > Maybe a better solution is to have some kind of notion of a default-only
> > entry, which is sufficient to insert the default into the struct but
> > isn't accepted as a user-settable item.
>
> This patch (for 8.4, but applies fuzzily to 9.0) implements this idea.
> Note that there's no explicit check that every heap option has a
> corresponding toast option; that's left to the developer's judgement to
> add.  I added the new member to relopt_gen struct so that existing
> entries did not require changes in initializers.

The new "default_only" field can be initialized only from the internal codes
and is not exported to user definded reloptions. We could add an additional
argument to add_xxx_reloption() functions, but it breaks ABI.

How about the attached patch? It just fills fillfactor (and analyze_threshold)
to default values for TOAST relations. I think responsibility for filling
reloptions with proper values is not in the generic option routines but in
AM-specific reloption handlers.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center


Attachment

pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: ExecutorCheckPerms() hook
Next
From: Fujii Masao
Date:
Subject: Open items related to SR