Re: Large writable variables

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Large writable variables
Дата
Msg-id 20181016041240.hhwbip74kge6ybcm@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Large writable variables  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

On 2018-10-15 16:45:03 -0700, Andres Freund wrote:
> I've a patch making .data variables constant, fwiw. Will post in a
> bit. Just so we don't duplicate work too much.

I pushed a few very obvious ones.

An additional fix, for the system attributes in heap.c, is attached. But
that's a bit more invasive, so I wanted to get some input.

I think all of the changes are fairly obvious and the new const
attributes just document what already had to be the case.  But to
correctly propagate the const through typedef-the-pointer-away typedefs,
I had to use the underlying type (e.g. use const NameData *n2 instad of
Name n2). To me that's the correct fix, but then I hate these typedefs
with a passion anyway.  An alternative fix is to add additional
typedefs like ConstName, but I don't find that particularly
advantageous.

Comments?

Arguably we should use consts more aggresively in signatures anyway, but
I think that's a separate effort.

Greetings,

Andres Freund

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WIP: Avoid creation of the free space map for small tables
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: Multi-insert into a partitioned table with before insert rowtrigger causes server crash on latest HEAD