|
6 | 6 | * |
7 | 7 | * Copyright (c) 1994, Regents of the University of California |
8 | 8 | * |
9 | | - * $Id: nbtree.h,v 1.25 1999/05/2516:13:32 momjian Exp $ |
| 9 | + * $Id: nbtree.h,v 1.26 1999/05/2518:31:28 vadim Exp $ |
10 | 10 | * |
11 | 11 | *------------------------------------------------------------------------- |
12 | 12 | */ |
|
19 | 19 | #include<storage/page.h> |
20 | 20 | #include<access/funcindex.h> |
21 | 21 | #include<access/itup.h> |
22 | | -#include<storage/buf.h> |
| 22 | +#include<storage/bufmgr.h>/* don't remove, required by BT_READ/BT_WRITE */ |
23 | 23 | #include<storage/itemptr.h> |
24 | 24 |
|
25 | 25 | /* |
@@ -107,26 +107,17 @@ typedef BTScanOpaqueData *BTScanOpaque; |
107 | 107 |
|
108 | 108 | typedefstructBTItemData |
109 | 109 | { |
110 | | -#ifndefBTREE_VERSION_1 |
111 | | -Oidbti_oid; |
112 | | -int32bti_dummy;/* padding to make bti_itup align at |
113 | | - * 8-byte boundary */ |
114 | | -#endif |
115 | 110 | IndexTupleDatabti_itup; |
116 | 111 | }BTItemData; |
117 | 112 |
|
118 | 113 | typedefBTItemData*BTItem; |
119 | 114 |
|
120 | | -#ifdefBTREE_VERSION_1 |
121 | 115 | #defineBTItemSame(i1,i2) ( i1->bti_itup.t_tid.ip_blkid.bi_hi == \ |
122 | 116 | i2->bti_itup.t_tid.ip_blkid.bi_hi && \ |
123 | 117 | i1->bti_itup.t_tid.ip_blkid.bi_lo == \ |
124 | 118 | i2->bti_itup.t_tid.ip_blkid.bi_lo && \ |
125 | 119 | i1->bti_itup.t_tid.ip_posid == \ |
126 | 120 | i2->bti_itup.t_tid.ip_posid ) |
127 | | -#else |
128 | | -#defineBTItemSame(i1,i2) ( i1->bti_oid == i2->bti_oid ) |
129 | | -#endif |
130 | 121 |
|
131 | 122 | /* |
132 | 123 | *BTStackData -- As we descend a tree, we push the (key, pointer) |
@@ -165,8 +156,8 @@ typedef struct BTPageState |
165 | 156 | *requests for pages, in order to do locking correctly. |
166 | 157 | */ |
167 | 158 |
|
168 | | -#defineBT_READ0 |
169 | | -#defineBT_WRITE1 |
| 159 | +#defineBT_READBUFFER_LOCK_SHARE |
| 160 | +#defineBT_WRITEBUFFER_LOCK_EXCLUSIVE |
170 | 161 |
|
171 | 162 | /* |
172 | 163 | *Similarly, the difference between insertion and non-insertion binary |
|