From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: remove ATTRIBUTE_FIXED_PART_SIZE |
Date: | 2018-08-21 15:15:53 |
Message-ID: | ec636b39-d401-937f-12c7-6fbdd888a44e@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-08-21 15:24:44 | Re: ALTER TABLE on system catalogs |
Previous Message | Peter Eisentraut | 2018-08-21 15:11:12 | Re: WaitForOlderSnapshots refactoring |