Re: Specifying the unit in storage parameter

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Specifying the unit in storage parameter
Дата
Msg-id 20140825182758.GY6343@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Specifying the unit in storage parameter  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Specifying the unit in storage parameter  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Fujii Masao wrote:
> On Thu, Aug 21, 2014 at 4:20 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:

> > Looking at the patch, the parameter "fillfactor" in the category
> > RELOPT_KIND_HEAP (the first element in intRelOpts of reloptions.c) is
> > not updated with the new field. It is only a one-line change.
> > @@ -97,7 +97,7 @@ static relopt_int intRelOpts[] =
> >                         "Packs table pages only to this percentage",
> >                         RELOPT_KIND_HEAP
> >                 },
> > -               HEAP_DEFAULT_FILLFACTOR, HEAP_MIN_FILLFACTOR, 100
> > +               HEAP_DEFAULT_FILLFACTOR, HEAP_MIN_FILLFACTOR, 100, 0
> >         },
> 
> Oh, good catch. I wonder why I did such a mistake...

Uninitialized elements at end of struct are filled with zeroes.  We do
have other examples of this -- for instance, config_generic in the guc.c
tables are almost always only 5 members long even though the struct is
quite a bit longer than that.  Most entries do not even have "flags" set.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: LIMIT for UPDATE and DELETE
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED