Re: [HACKERS] Revisiting NAMEDATALEN

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Revisiting NAMEDATALEN
Дата
Msg-id CA+TgmoZ7vtzX=Ry2TYLrAborWUxwUWbHCAO13wpPdsKr=iy6rQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Revisiting NAMEDATALEN  (Emrul <emrul@emrul.com>)
Ответы Re: [HACKERS] Revisiting NAMEDATALEN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jul 7, 2017 at 5:53 AM, Emrul <emrul@emrul.com> wrote:
> Tom, thank you for that pointer.  I get now that it is not free and therefore
> why its not something that should be changed by default.
>
> I guess the problem is 'build your own copy' (i.e. compiling from source) is
> something that sends most DB teams running into the hills.
>
> A solution might be to make NAMEDATALEN configurable without having to
> recompile source (perhaps a config variable or an initdb parameter). When I
> have some free time I will investigate whether this is doable.

Well, it wouldn't be free.  The problem is:

typedef struct nameData
{       char            data[NAMEDATALEN];
} NameData;

If it were not a compile-time constant, every bit of code that uses
NameData (or otherwise depends on NAMEDATALEN being constant) would
have to be changed.  That would be invasive and likely have at least a
minor performance cost.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: [HACKERS] Rust bindings to pgtypes lib
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] [WIP] Zipfian distribution in pgbench