Re: Use of SizeOfIptrData - is that obsolete?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use of SizeOfIptrData - is that obsolete?
Дата
Msg-id 8044.1474569299@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Use of SizeOfIptrData - is that obsolete?  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Use of SizeOfIptrData - is that obsolete?  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Список pgsql-hackers
Pavan Deolasee <pavan.deolasee@gmail.com> writes:
> On Tue, Sep 20, 2016 at 8:34 PM, Tom Lane <tgl@sss.pgh.pa.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



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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: gratuitous casting away const
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Possibly too stringent Assert() in b-tree code