1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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.
This commit is contained in:
Tom Lane
2005-08-12 01:36:05 +00:00
parent 9e4a2de844
commit 721e53785d
20 changed files with 416 additions and 268 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.111 2005/06/21 20:45:44 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.112 2005/08/12 01:35:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1962,11 +1962,11 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
}
/*
* Special case: <Init> type with <Max OID> tag; this is part of a
* DATA restore even though it has SQL.
* Special case: <Init> type with <Max OID> tag; this is obsolete
* and we always ignore it.
*/
if ((strcmp(te->desc, "<Init>") == 0) && (strcmp(te->tag, "Max OID") == 0))
res = REQ_DATA;
return 0;
/* Mask it if we only want schema */
if (ropt->schemaOnly)