From 721e53785d837d48dc33dd68aa77c42ece7c9afb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Aug 2005 01:36:05 +0000 Subject: 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. --- src/backend/commands/typecmds.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/backend/commands/typecmds.c') diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 31e43cd4281..e0c3a311eac 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.78 2005/08/04 01:09:28 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.79 2005/08/12 01:35:58 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -339,7 +339,6 @@ DefineType(List *names, List *parameters) typoid = TypeCreate(typeName, /* type name */ typeNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ internalLength, /* internal size */ @@ -372,7 +371,6 @@ DefineType(List *names, List *parameters) TypeCreate(shadow_type, /* type name */ typeNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ -1, /* internal size */ @@ -724,7 +722,6 @@ DefineDomain(CreateDomainStmt *stmt) domainoid = TypeCreate(domainName, /* type name */ domainNamespace, /* namespace */ - InvalidOid, /* preassigned type oid (none here) */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ internalLength, /* internal size */ -- cgit v1.2.3