summaryrefslogtreecommitdiff
path: root/src/include/access/transam.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-08-10 18:57:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-08-10 18:57:42 +0000
commitbf56f0759bdfa87f143c3abd09f893a5f530fe88 (patch)
tree10555a5e46bcfdfd9799b8f0e13ab48101d766de /src/include/access/transam.h
parentd062f0f4e91f68b1f55b04691bd92d1efc83dc54 (diff)
Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
Diffstat (limited to 'src/include/access/transam.h')
-rw-r--r--src/include/access/transam.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h
index 5d328b3c714..9a872278ad7 100644
--- a/src/include/access/transam.h
+++ b/src/include/access/transam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: transam.h,v 1.36 2001/07/12 04:11:13 tgl Exp $
+ * $Id: transam.h,v 1.37 2001/08/10 18:57:39 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,11 +63,27 @@
typedef unsigned char XidStatus; /* (2 bits) */
/* ----------
- * We reserve the first 16384 object ids for manual assignment.
- * oid's less than this appear in the .bki files. the choice of
- * 16384 is completely arbitrary.
+ * Object ID (OID) zero is InvalidOid.
+ *
+ * OIDs 1-9999 are reserved for manual assignment (see the files
+ * in src/include/catalog/).
+ *
+ * OIDS 10000-16383 are reserved for assignment by genbki.sh.
+ *
+ * OIDs beginning at 16384 are assigned at runtime from the OID
+ * generator. (The first few of these will be assigned during initdb,
+ * to objects created after the initial BKI script processing.)
+ *
+ * The choices of 10000 and 16384 are completely arbitrary, and can be moved
+ * if we run low on OIDs in either category. Changing the macros below
+ * should be sufficient to do this.
+ *
+ * NOTE: if the OID generator wraps around, we should skip over OIDs 0-16383
+ * and resume with 16384. This minimizes the odds of OID conflict, by not
+ * reassigning OIDs that might have been assigned during initdb.
* ----------
*/
+#define FirstGenBKIObjectId 10000
#define BootstrapObjectIdData 16384
/*
@@ -111,7 +127,7 @@ extern void TransBlockNumberSetXidStatus(Relation relation,
/* in transam/varsup.c */
extern void GetNewTransactionId(TransactionId *xid);
extern void ReadNewTransactionId(TransactionId *xid);
-extern void GetNewObjectId(Oid *oid_return);
+extern Oid GetNewObjectId(void);
extern void CheckMaxObjectId(Oid assigned_oid);
/* ----------------