summaryrefslogtreecommitdiff
path: root/src/include/catalog
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/catalog
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/catalog')
-rw-r--r--src/include/catalog/catalog.h7
-rw-r--r--src/include/catalog/pg_type.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h
index c9da1b35ab..d30bc76359 100644
--- a/src/include/catalog/catalog.h
+++ b/src/include/catalog/catalog.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/catalog/catalog.h,v 1.32 2005/05/10 22:27:30 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/catalog.h,v 1.33 2005/08/12 01:36:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,6 +31,9 @@ extern bool IsToastNamespace(Oid namespaceId);
extern bool IsReservedName(const char *name);
-extern Oid newoid(void);
+extern Oid GetNewOid(Relation relation);
+extern Oid GetNewOidWithIndex(Relation relation, Relation indexrel);
+extern Oid GetNewRelFileNode(Oid reltablespace, bool relisshared,
+ Relation pg_class);
#endif /* CATALOG_H */
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 5712e0d692..6e4092fd39 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.164 2005/07/20 16:42:32 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.165 2005/08/12 01:36:04 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -556,7 +556,6 @@ extern Oid TypeShellMake(const char *typeName, Oid typeNamespace);
extern Oid TypeCreate(const char *typeName,
Oid typeNamespace,
- Oid assignedTypeOid,
Oid relationOid,
char relationKind,
int16 internalSize,