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

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

On 2021-05-25 14:46:27 +0900, Michael Paquier wrote:
> That would work.  Your suggestion, as I understood it first, makes the
> code simpler by not using tup_values at all as the set of values[] is
> filled when the values and nulls are extracted.  So I have gone with
> this simplification, and applied the patch (moved a bit the comments
> while on it).

Hm. memsetting values_free() to zero repeatedly isn't quite free, nor is
iterating over all columns one more time. Note that values/isnull are
passed in, and allocated with an accurate size, so it's a bit odd to
then do a pessimally sized stack allocation. Efficiency aside, that just
seems a bit weird?

The efficiency bit is probably going to be swamped by the addition of
the compression handling, given the amount of additional work we're now
doing in in reform_and_rewrite_tuple(). I wonder if we should check how
much slower a VACUUM FULL of a table with a few varlena columns has
gotten vs 13.

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?