Commit 1a4a0329 authored by Peter Geoghegan's avatar Peter Geoghegan

nbtree: Rename BT_HEAP_TID_ATTR.

Author: Peter Geoghegan
Reviewed-By: Heikki Linnakangas
parent a0dc3c19
...@@ -263,9 +263,8 @@ typedef struct BTMetaPageData ...@@ -263,9 +263,8 @@ typedef struct BTMetaPageData
* offset field only stores the number of columns/attributes when the * offset field only stores the number of columns/attributes when the
* INDEX_ALT_TID_MASK bit is set, which doesn't count the trailing heap * INDEX_ALT_TID_MASK bit is set, which doesn't count the trailing heap
* TID column sometimes stored in pivot tuples -- that's represented by * TID column sometimes stored in pivot tuples -- that's represented by
* the presence of BT_HEAP_TID_ATTR. The INDEX_ALT_TID_MASK bit in t_info * the presence of BT_PIVOT_HEAP_TID_ATTR. The INDEX_ALT_TID_MASK bit in
* is always set on BTREE_VERSION 4. BT_HEAP_TID_ATTR can only be set on * t_info is always set on BTREE_VERSION 4 pivot tuples.
* BTREE_VERSION 4.
* *
* In version 3 indexes, the INDEX_ALT_TID_MASK flag might not be set in * In version 3 indexes, the INDEX_ALT_TID_MASK flag might not be set in
* pivot tuples. In that case, the number of key columns is implicitly * pivot tuples. In that case, the number of key columns is implicitly
...@@ -296,7 +295,7 @@ typedef struct BTMetaPageData ...@@ -296,7 +295,7 @@ typedef struct BTMetaPageData
/* Item pointer offset bits */ /* Item pointer offset bits */
#define BT_RESERVED_OFFSET_MASK 0xF000 #define BT_RESERVED_OFFSET_MASK 0xF000
#define BT_N_KEYS_OFFSET_MASK 0x0FFF #define BT_N_KEYS_OFFSET_MASK 0x0FFF
#define BT_HEAP_TID_ATTR 0x1000 #define BT_PIVOT_HEAP_TID_ATTR 0x1000
/* Get/set downlink block number in pivot tuple */ /* Get/set downlink block number in pivot tuple */
#define BTreeTupleGetDownLink(itup) \ #define BTreeTupleGetDownLink(itup) \
...@@ -347,7 +346,7 @@ typedef struct BTMetaPageData ...@@ -347,7 +346,7 @@ typedef struct BTMetaPageData
#define BTreeTupleGetHeapTID(itup) \ #define BTreeTupleGetHeapTID(itup) \
( \ ( \
(itup)->t_info & INDEX_ALT_TID_MASK && \ (itup)->t_info & INDEX_ALT_TID_MASK && \
(ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) & BT_HEAP_TID_ATTR) != 0 ? \ (ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) & BT_PIVOT_HEAP_TID_ATTR) != 0 ? \
( \ ( \
(ItemPointer) (((char *) (itup) + IndexTupleSize(itup)) - \ (ItemPointer) (((char *) (itup) + IndexTupleSize(itup)) - \
sizeof(ItemPointerData)) \ sizeof(ItemPointerData)) \
...@@ -362,7 +361,7 @@ typedef struct BTMetaPageData ...@@ -362,7 +361,7 @@ typedef struct BTMetaPageData
do { \ do { \
Assert((itup)->t_info & INDEX_ALT_TID_MASK); \ Assert((itup)->t_info & INDEX_ALT_TID_MASK); \
ItemPointerSetOffsetNumber(&(itup)->t_tid, \ ItemPointerSetOffsetNumber(&(itup)->t_tid, \
ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) | BT_HEAP_TID_ATTR); \ ItemPointerGetOffsetNumberNoCheck(&(itup)->t_tid) | BT_PIVOT_HEAP_TID_ATTR); \
} while(0) } while(0)
/* /*
......
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