summaryrefslogtreecommitdiff
path: root/src/include/utils/rel.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-12 01:36:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-12 01:36:05 +0000
commit721e53785d837d48dc33dd68aa77c42ece7c9afb (patch)
tree59c7bf34cada497f50c61072826d6fa0de080b57 /src/include/utils/rel.h
parent9e4a2de8448997924e74ace8dfd9ccd05acb2d08 (diff)
downloadpostgresql-721e53785d837d48dc33dd68aa77c42ece7c9afb.tar.gz
Solve the problem of OID collisions by probing for duplicate OIDs
whenever we generate a new OID. This prevents occasional duplicate-OID errors that can otherwise occur once the OID counter has wrapped around. Duplicate relfilenode values are also checked for when creating new physical files. Per my recent proposal.
Diffstat (limited to 'src/include/utils/rel.h')
-rw-r--r--src/include/utils/rel.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index e3f636b83d..172810ab1f 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.84 2005/05/27 23:31:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.85 2005/08/12 01:36:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -136,8 +136,8 @@ typedef struct RelationData
bool rd_istemp; /* rel uses the local buffer mgr */
bool rd_isnailed; /* rel is nailed in cache */
bool rd_isvalid; /* relcache entry is valid */
- char rd_indexvalid; /* state of rd_indexlist: 0 = not valid, 1
- * = valid, 2 = temporarily forced */
+ char rd_indexvalid; /* state of rd_indexlist: 0 = not valid,
+ * 1 = valid, 2 = temporarily forced */
SubTransactionId rd_createSubid; /* rel was created in current xact */
/*
@@ -151,6 +151,7 @@ typedef struct RelationData
TupleDesc rd_att; /* tuple descriptor */
Oid rd_id; /* relation's object id */
List *rd_indexlist; /* list of OIDs of indexes on relation */
+ Oid rd_oidindex; /* OID of unique index on OID, if any */
LockInfoData rd_lockInfo; /* lock mgr's info for locking relation */
RuleLock *rd_rules; /* rewrite rules */
MemoryContext rd_rulescxt; /* private memory cxt for rd_rules, if any */