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. --- doc/src/sgml/ddl.sgml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 3c53973b762..abe3b582016 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1,4 +1,4 @@ - + Data Definition @@ -871,7 +871,7 @@ CREATE TABLE order_items ( The object identifier (object ID) of a row. This column is only present if the table was created using WITH OIDS, or if the - configuration variable was enabled. This column is of type + configuration variable was set. This column is of type oid (same name as the column); see for more information about the type. @@ -992,7 +992,13 @@ CREATE TABLE order_items ( A unique constraint should be created on the OID column of each - table for which the OID will be used to identify rows. + table for which the OID will be used to identify rows. When such + a unique constraint (or unique index) exists, the system takes + care not to generate an OID matching an already-existing row. + (Of course, this is only possible if the table contains fewer + than 232 (4 billion) rows, and in practice the + table size had better be much less than that, or performance + may suffer.) @@ -1005,9 +1011,8 @@ CREATE TABLE order_items ( The tables in question should be created using WITH - OIDS to ensure forward compatibility with future - releases of PostgreSQL. It is - planned that WITHOUT OIDS will become the default. + OIDS. As of PostgreSQL 8.1, + WITHOUT OIDS is the default. -- cgit v1.2.3