Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8023b58

Browse files
committed
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'scomplained, it seems probable that there are no supported compilersthat don't think sizeof(ItemPointerData) is 6. If there are, we'rewasting MAXALIGN per heap tuple anyway, so it's rather silly to worryabout whether we can shave space in places like WAL records.Pavan DeolaseeDiscussion: <CABOikdOOawDda4hwLOT6zdA6MFfPLu3Z2YBZkX0JdayNS6JOeQ@mail.gmail.com>
1 parent96dd77d commit8023b58

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

‎src/backend/executor/nodeTidscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ TidListCreate(TidScanState *tidstate)
139139
continue;
140140
itemarray=DatumGetArrayTypeP(arraydatum);
141141
deconstruct_array(itemarray,
142-
TIDOID,SizeOfIptrData, false,'s',
142+
TIDOID,sizeof(ItemPointerData), false,'s',
143143
&ipdatums,&ipnulls,&ndatums);
144144
if (numTids+ndatums>numAllocTids)
145145
{

‎src/include/storage/itemptr.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
* structure padding bytes. The struct is designed to be six bytes long
3131
* (it contains three int16 fields) but a few compilers will pad it to
3232
* eight bytes unless coerced. We apply appropriate persuasion where
33-
* possible, and to cope with unpersuadable compilers, we try to use
34-
* "SizeOfIptrData" rather than "sizeof(ItemPointerData)" when computing
35-
* on-disk sizes.
33+
* possible. If your compiler can't be made to play along, you'll waste
34+
* lots of space.
3635
*/
3736
typedefstructItemPointerData
3837
{
@@ -46,9 +45,6 @@ pg_attribute_aligned(2)
4645
#endif
4746
ItemPointerData;
4847

49-
#defineSizeOfIptrData\
50-
(offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber))
51-
5248
typedefItemPointerData*ItemPointer;
5349

5450
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp