Move pg_attribute.attcompression to earlier in struct for reduced size?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Move pg_attribute.attcompression to earlier in struct for reduced size?
Дата
Msg-id 20210517204803.iyk5wwvwgtjcmc5w@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Move pg_attribute.attcompression to earlier in struct for reduced size?  (Justin Pryzby <pryzby@telsasoft.com>)
Re: Move pg_attribute.attcompression to earlier in struct for reduced size?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

pg_attribute is one of the biggest table in a new cluster, and often the
biggest table in production clusters. Its size is also quite relevant in
memory, due to all the TupleDescs we allocate.

I just noticed that the new attcompression increased the size not just
by 1 byte, but by 4, due to padding. While an increase from 112 to 116
bytes isn't the end of the world, it does seem worth considering using
existing unused bytes instead?

If we moved attcompression to all the other bool/char fields, we'd avoid
that size increase, as there's an existing 2 byte hole.

Of course there's the argument that we shouldn't change the column order
for existing SELECT * queries, but the existing placement already does
(the CATALOG_VARLEN columns follow).

Greetings,

Andres Freund



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: allow specifying direct role membership in pg_hba.conf
Следующее
От: Peter Eisentraut
Дата:
Сообщение: ICU bool problem