From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Use of SizeOfIptrData - is that obsolete? |
Date: | 2016-09-22 18:34:59 |
Message-ID: | 8044.1474569299@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> writes:
> On Tue, Sep 20, 2016 at 8:34 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Realistically, because struct HeapTupleHeaderData contains a field of
>> type ItemPointerData, it's probably silly to imagine that we can save
>> anything if the compiler can't be persuaded to believe that
>> sizeof(ItemPointerData) is 6. It may well be that the structure pragmas
>> work on everything that wouldn't natively believe that anyway.
> Yeah, that's what I thought and rest of the code seems to make that
> assumption as well. Attached patch removes the last remaining reference to
> SizeOfIptrData and also removes the macro and the associated comment.
I thought removing the comment altogether was not appropriate, because
it remains true that you want to work really hard to ensure that
sizeof(ItemPointerData) is 6. We're just giving up on pretense of support
for compilers that don't believe that. I'm half tempted to introduce a
StaticAssert about it, but refrained for the moment.
> While htup.h refactoring happened in 9.5, I don't see any point in back
> patching this.
Agreed. Pushed to HEAD only.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-09-22 18:51:06 | Re: Possibly too stringent Assert() in b-tree code |
Previous Message | Mark Dilger | 2016-09-22 17:53:49 | Re: gratuitous casting away const |