Commit 8023b582 authored by Tom Lane's avatar Tom Lane

Remove nearly-unused SizeOfIptrData macro.

Past refactorings have removed all but one reference to SizeOfIptrData
(and that one place was in a pretty noncritical spot).  Since nobody's
complained, it seems probable that there are no supported compilers
that don't think sizeof(ItemPointerData) is 6.  If there are, we're
wasting MAXALIGN per heap tuple anyway, so it's rather silly to worry
about whether we can shave space in places like WAL records.

Pavan Deolasee

Discussion: <CABOikdOOawDda4hwLOT6zdA6MFfPLu3Z2YBZkX0JdayNS6JOeQ@mail.gmail.com>
parent 96dd77d3
...@@ -139,7 +139,7 @@ TidListCreate(TidScanState *tidstate) ...@@ -139,7 +139,7 @@ TidListCreate(TidScanState *tidstate)
continue; continue;
itemarray = DatumGetArrayTypeP(arraydatum); itemarray = DatumGetArrayTypeP(arraydatum);
deconstruct_array(itemarray, deconstruct_array(itemarray,
TIDOID, SizeOfIptrData, false, 's', TIDOID, sizeof(ItemPointerData), false, 's',
&ipdatums, &ipnulls, &ndatums); &ipdatums, &ipnulls, &ndatums);
if (numTids + ndatums > numAllocTids) if (numTids + ndatums > numAllocTids)
{ {
......
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
* structure padding bytes. The struct is designed to be six bytes long * structure padding bytes. The struct is designed to be six bytes long
* (it contains three int16 fields) but a few compilers will pad it to * (it contains three int16 fields) but a few compilers will pad it to
* eight bytes unless coerced. We apply appropriate persuasion where * eight bytes unless coerced. We apply appropriate persuasion where
* possible, and to cope with unpersuadable compilers, we try to use * possible. If your compiler can't be made to play along, you'll waste
* "SizeOfIptrData" rather than "sizeof(ItemPointerData)" when computing * lots of space.
* on-disk sizes.
*/ */
typedef struct ItemPointerData typedef struct ItemPointerData
{ {
...@@ -46,9 +45,6 @@ pg_attribute_aligned(2) ...@@ -46,9 +45,6 @@ pg_attribute_aligned(2)
#endif #endif
ItemPointerData; ItemPointerData;
#define SizeOfIptrData \
(offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber))
typedef ItemPointerData *ItemPointer; typedef ItemPointerData *ItemPointer;
/* ---------------- /* ----------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment