From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: remove ATTRIBUTE_FIXED_PART_SIZE |
Date: | 2018-08-24 15:18:15 |
Message-ID: | 0137d98c-43bd-177c-579d-7e0123891576@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 21/08/2018 17:38, Peter Eisentraut wrote:
> On 20/08/2018 15:14, Tom Lane wrote:
>> I agree this is all moot as long as there's no pad bytes. What I'm
>> trying to figure out is if we need to put in place some provisions
>> to prevent there from being pad bytes at the end of any catalog struct.
>> According to what Andres is saying, it seems like we do (at least for
>> ones with varlena fields).
>
> Yes, I think there could be a problem. I took a brief look through the
> catalogs, and while there are plenty of catalogs with trailing padding,
> finding that in combination with trailing varlena fields that might
> legitimately be all null in practice might require a closer look.
Looking into this a bit more, a few catalogs could use some
BKI_FORCE_NOT_NULL settings, which then avoids the described situation.
See attached patch.
That leaves pg_constraint and pg_event_trigger where you can construct
legitimate tuples where the fixed portion has trailing padding and the
variable fields can all be null.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Add-some-not-null-constraints-to-catalogs.patch | text/plain | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-08-24 15:36:41 | Re: table_privileges view under information_schema doesn't show privileges on materialized views |
Previous Message | Alexandra Ryzhevich | 2018-08-24 14:37:17 | Re: [PATCH] Add regress test for pg_read_all_stats role |