aboutsummaryrefslogtreecommitdiff
path: root/doc/src
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 /doc/src
parent9e4a2de8448997924e74ace8dfd9ccd05acb2d08 (diff)
downloadpostgresql-721e53785d837d48dc33dd68aa77c42ece7c9afb.tar.gz
postgresql-721e53785d837d48dc33dd68aa77c42ece7c9afb.zip
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 'doc/src')
-rw-r--r--doc/src/sgml/ddl.sgml17
1 files changed, 11 insertions, 6 deletions
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 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.42 2005/07/14 06:17:35 neilc Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.43 2005/08/12 01:35:53 tgl Exp $ -->
<chapter id="ddl">
<title>Data Definition</title>
@@ -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 <literal>WITH
OIDS</literal>, or if the <xref linkend="guc-default-with-oids">
- configuration variable was enabled. This column is of type
+ configuration variable was set. This column is of type
<type>oid</type> (same name as the column); see <xref
linkend="datatype-oid"> for more information about the type.
</para>
@@ -992,7 +992,13 @@ CREATE TABLE order_items (
<listitem>
<para>
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 2<superscript>32</> (4 billion) rows, and in practice the
+ table size had better be much less than that, or performance
+ may suffer.)
</para>
</listitem>
<listitem>
@@ -1005,9 +1011,8 @@ CREATE TABLE order_items (
<listitem>
<para>
The tables in question should be created using <literal>WITH
- OIDS</literal> to ensure forward compatibility with future
- releases of <productname>PostgreSQL</productname>. It is
- planned that <literal>WITHOUT OIDS</> will become the default.
+ OIDS</literal>. As of <productname>PostgreSQL</productname> 8.1,
+ <literal>WITHOUT OIDS</> is the default.
</para>
</listitem>
</itemizedlist>