From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Move pg_attribute.attcompression to earlier in struct for reduced size? |
Date: | 2021-05-17 21:06:32 |
Message-ID: | 2854987.1621285592@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> 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.
+1. Looks to me like its existing placement was according to the good
old "add new things at the end" anti-pattern. It certainly isn't
related to the adjacent fields.
Putting it just after attalign seems like a reasonably sane choice
from the standpoint of grouping things affecting physical storage;
and as you say, that wins from the standpoint of using up alignment
padding rather than adding more.
Personally I'd think the most consistent order in that area would
be attbyval, attalign, attstorage, attcompression; but perhaps it's
too late to swap the order of attstorage and attalign.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Chapman Flack | 2021-05-17 21:18:07 | Re: allow specifying direct role membership in pg_hba.conf |
Previous Message | Justin Pryzby | 2021-05-17 21:05:44 | Re: Move pg_attribute.attcompression to earlier in struct for reduced size? |