Re: remove ATTRIBUTE_FIXED_PART_SIZE

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: remove ATTRIBUTE_FIXED_PART_SIZE
Дата
Msg-id ec636b39-d401-937f-12c7-6fbdd888a44e@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: remove ATTRIBUTE_FIXED_PART_SIZE  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 20/08/2018 12:46, Andres Freund wrote:
> static VacAttrStats *
> examine_attribute(Relation onerel, int attnum, Node *index_expr)
> {
> ...
>     /*
>      * Create the VacAttrStats struct.  Note that we only have a copy of the
>      * fixed fields of the pg_attribute tuple.
>      */
>     stats = (VacAttrStats *) palloc0(sizeof(VacAttrStats));
>     stats->attr = (Form_pg_attribute) palloc(ATTRIBUTE_FIXED_PART_SIZE);
>     memcpy(stats->attr, attr, ATTRIBUTE_FIXED_PART_SIZE);
> 
> Accesses to stats->attr can legitimately assume that the padding at the
> tail end of attr is present (i.e. widening a load / store).

Yeah, that's probably just broken.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: WaitForOlderSnapshots refactoring
Следующее
От: Andres Freund
Дата:
Сообщение: Re: ALTER TABLE on system catalogs