pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
FAQ 4.15 misleading about uniqueness of OIDs
3+ messages / 3 participants
[nested] [flat]

* FAQ 4.15 misleading about uniqueness of OIDs
@ 2005-01-24 05:10  Michael Fuhr <mike@fuhr.org>
  0 siblings, 2 replies; 3+ messages in thread

From: Michael Fuhr @ 2005-01-24 05:10 UTC (permalink / raw)
  To: pgsql-docs

FAQ 4.15 "What is an OID? What is a TID?" is misleading about the
uniqueness of OIDs.  It does mention the possibility of overflow
(while mentioning that nobody has ever reported it), but it doesn't
discourage their use as primary keys like the documentation does
in, for example, the following sections:

http://www.postgresql.org/docs/8.0/static/datatype-oid.html
http://www.postgresql.org/docs/8.0/static/ddl-system-columns.html

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: FAQ 4.15 misleading about uniqueness of OIDs
@ 2005-01-24 05:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Michael Fuhr <mike@fuhr.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-01-24 05:28 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-docs

Michael Fuhr <mike@fuhr.org> writes:
> FAQ 4.15 "What is an OID? What is a TID?" is misleading about the
> uniqueness of OIDs.  It does mention the possibility of overflow
> (while mentioning that nobody has ever reported it),

The latter claim is surely obsolete, anyway.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: FAQ 4.15 misleading about uniqueness of OIDs
@ 2005-01-30 02:08  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Michael Fuhr <mike@fuhr.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2005-01-30 02:08 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-docs

Michael Fuhr wrote:
> FAQ 4.15 "What is an OID? What is a TID?" is misleading about the
> uniqueness of OIDs.  It does mention the possibility of overflow
> (while mentioning that nobody has ever reported it), but it doesn't
> discourage their use as primary keys like the documentation does
> in, for example, the following sections:
> 
> http://www.postgresql.org/docs/8.0/static/datatype-oid.html
> http://www.postgresql.org/docs/8.0/static/ddl-system-columns.html

Wow, that one really needed updating!  Here is the new text:

---------------------------------------------------------------------------

4.15) What is an OID? What is a TID?

Every row that is created in PostgreSQL gets a unique OID unless created
WITHOUT OIDS. OIDs are autotomatically assigned unique 4-byte integers
that are unique across the entire installation. However, they overflow
at 4 billion, and then the OIDs start being duplicated. PostgreSQL uses
OIDs to link its internal system tables together.

To uniquely number columns in user tables, it is best to use SERIAL
rather than OIDs because SERIAL sequences are unique only within a
single table. and are therefore less likely to overflow. SERIAL8 is
available for storing eight-byte sequence values.

TIDs are used to identify specific physical rows with block and offset
values. TIDs change after rows are modified or reloaded. They are used
by index entries to point to physical rows.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-01-30 02:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24 05:10 FAQ 4.15 misleading about uniqueness of OIDs Michael Fuhr <mike@fuhr.org>
2005-01-24 05:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-01-30 02:08 ` Bruce Momjian <pgman@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox