fillfactor gets set to zero for toast tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема fillfactor gets set to zero for toast tables
Дата
Msg-id 20336.1273861170@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: fillfactor gets set to zero for toast tables  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
I've been able to reproduce the problem described here:
http://archives.postgresql.org/pgsql-bugs/2010-05/msg00100.php
Do this:

create table foo(f1 text);
alter table foo set (toast.autovacuum_enabled = false);
insert into foo values(repeat('xyzzy',100000));
vacuum verbose foo;

Notice that the vacuum output shows there's only one toast tuple per
toast table page.

The problem is that if any reloption is set for the toast table,
we build a StdRdOptions struct in which fillfactor is zero, and
then all the code that actually uses fillfactor honors that.
And the reason fillfactor gets left as zero is that there is no
entry for it in the tables for toast-table reloptions.  Clearly,
this wasn't thought through carefully enough.

I'm inclined to think that we should remove the notion of there
being separate sets of rdoptions for heaps and toast tables ---
any case in which someone tries to omit a StdRdOption for toast
tables is going to fail the same way, unless we are fortunate
enough that zero is a desirable default.  What seems more rational
is to provide toast.fillfactor but give it min/max/default = 100.

Thoughts?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: recovery consistent != hot standby
Следующее
От: Robert Haas
Дата:
Сообщение: Re: recovery getting interrupted is not so unusual as it used to be