aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/gist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/gist.h')
-rw-r--r--src/include/access/gist.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index 52d3a2fe1a0..eab6a01bfd5 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/gist.h,v 1.57 2007/01/05 22:19:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/gist.h,v 1.58 2007/04/09 22:04:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,26 +56,31 @@
/*
* Page opaque data in a GiST index page.
*/
-#define F_LEAF (1 << 0)
-#define F_DELETED (1 << 1)
+#define F_LEAF (1 << 0)
+#define F_DELETED (1 << 1)
#define F_TUPLES_DELETED (1 << 2)
typedef XLogRecPtr GistNSN;
typedef struct GISTPageOpaqueData
{
- uint32 flags; /* 29 bits are unused for now */
- BlockNumber rightlink;
-
- /*
- * the only meaning - change this value if page split.
- */
- GistNSN nsn;
+ GistNSN nsn; /* this value must change on page split */
+ BlockNumber rightlink; /* next page if any */
+ uint16 flags; /* see bit definitions above */
+ uint16 gist_page_id; /* for identification of GiST indexes */
} GISTPageOpaqueData;
typedef GISTPageOpaqueData *GISTPageOpaque;
/*
+ * The page ID is for the convenience of pg_filedump and similar utilities,
+ * which otherwise would have a hard time telling pages of different index
+ * types apart. It should be the last 2 bytes on the page. This is more or
+ * less "free" due to alignment considerations.
+ */
+#define GIST_PAGE_ID 0xFF81
+
+/*
* This is the Split Vector to be returned by the PickSplit method.
* PickSplit should check spl_(r|l)datum_exists. If it is 'true',
* that corresponding spl_(r|l)datum already defined and