Skip to content

Commit 1a4a032

Browse files
nbtree: Rename BT_HEAP_TID_ATTR.
Author: Peter Geoghegan Reviewed-By: Heikki Linnakangas
1 parent a0dc3c1 commit 1a4a032

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/include/access/nbtree.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,8 @@ typedef struct BTMetaPageData
263263
* offset field only stores the number of columns/attributes when the
264264
* INDEX_ALT_TID_MASK bit is set, which doesn't count the trailing heap
265265
* TID column sometimes stored in pivot tuples -- that's represented by
266-
* the presence of BT_HEAP_TID_ATTR. The INDEX_ALT_TID_MASK bit in t_info
267-
* is always set on BTREE_VERSION 4. BT_HEAP_TID_ATTR can only be set on
268-
* BTREE_VERSION 4.
266+
* the presence of BT_PIVOT_HEAP_TID_ATTR. The INDEX_ALT_TID_MASK bit in
267+
* t_info is always set on BTREE_VERSION 4 pivot tuples.
269268
*
270269
* In version 3 indexes, the INDEX_ALT_TID_MASK flag might not be set in
271270
* pivot tuples. In that case, the number of key columns is implicitly
@@ -296,7 +295,7 @@ typedef struct BTMetaPageData
296295
/* Item pointer offset bits */
297296
#define BT_RESERVED_OFFSET_MASK 0xF000
298297
#define BT_N_KEYS_OFFSET_MASK 0x0FFF
299-
#define BT_HEAP_TID_ATTR 0x1000
298+
#define BT_PIVOT_HEAP_TID_ATTR 0x1000
300299

301300
/* Get/set downlink block number in pivot tuple */
302301
#define BTreeTupleGetDownLink(itup) \
@@ -347,7 +346,7 @@ typedef struct BTMetaPageData
347346
#define BTreeTupleGetHeapTID(itup) \
348347
( \
349348
(itup)->t_info & INDEX_ALT_TID_MASK && \
350-
(ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) & BT_HEAP_TID_ATTR) != 0 ? \
349+
(ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) & BT_PIVOT_HEAP_TID_ATTR) != 0 ? \
351350
( \
352351
(ItemPointer) (((char *) (itup) + IndexTupleSize(itup)) - \
353352
sizeof(ItemPointerData)) \
@@ -362,7 +361,7 @@ typedef struct BTMetaPageData
362361
do { \
363362
Assert((itup)->t_info & INDEX_ALT_TID_MASK); \
364363
ItemPointerSetOffsetNumber(&(itup)->t_tid, \
365-
ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) | BT_HEAP_TID_ATTR); \
364+
ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) | BT_PIVOT_HEAP_TID_ATTR); \
366365
} while(0)
367366

368367
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy