aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-09 22:04:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-09 22:04:08 +0000
commit56218fbc487991ed98358cd8016dc5c4615bed96 (patch)
tree0840591dffb49c556f0943e1c91b0628c18b4ced /src/backend/access/gist/gistutil.c
parent485d9ca96ff0ef6ab1e424a4ded3eeb53a9cf3df (diff)
downloadpostgresql-56218fbc487991ed98358cd8016dc5c4615bed96.tar.gz
postgresql-56218fbc487991ed98358cd8016dc5c4615bed96.zip
Minor tweaking of index special-space definitions so that the various
index types can be reliably distinguished by examining the special space on an index page. Per my earlier proposal, plus the realization that there's no need for btree's vacuum cycle ID to cycle through every possible 16-bit value. Restricting its range a little costs nearly nothing and eliminates the possibility of collisions. Memo to self: remember to make bitmap indexes play along with this scheme, assuming that patch ever gets accepted.
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
-rw-r--r--src/backend/access/gist/gistutil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 0c10fc49cc7..c09e9249ea3 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.21 2007/01/05 22:19:22 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.22 2007/04/09 22:03:57 tgl Exp $
*-------------------------------------------------------------------------
*/
#include "postgres.h"
@@ -559,10 +559,11 @@ GISTInitBuffer(Buffer b, uint32 f)
PageInit(page, pageSize, sizeof(GISTPageOpaqueData));
opaque = GistPageGetOpaque(page);
- opaque->flags = f;
- opaque->rightlink = InvalidBlockNumber;
/* page was already zeroed by PageInit, so this is not needed: */
/* memset(&(opaque->nsn), 0, sizeof(GistNSN)); */
+ opaque->rightlink = InvalidBlockNumber;
+ opaque->flags = f;
+ opaque->gist_page_id = GIST_PAGE_ID;
}
/*