Re: Doubts about oid - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Doubts about oid
Date
Msg-id 201002180656.46204.adrian.klaver@gmail.com
Whole thread Raw
In response to Doubts about oid  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
Responses Re: Doubts about oid  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
List pgsql-general
On Wednesday 17 February 2010 8:13:51 pm Jayadevan M wrote:
> Hi,
> I was reading about oid and default configuration of PostgreSQL. A couple
> of doubts
> 1) Why is use of OIDS considered deprecated? Is there something else that
> can be used in place of oids for user tables?

Sequences:
http://www.postgresql.org/docs/8.4/interactive/sql-createsequence.html

> 2) Is there a performance impact if we keep the default default_with_oids
> to ON?
> Googling, I came across this -
> http://philmcrew.com/oid.html
> But most of the links given at that page were broken and the page itself
> did not provide a lot of information.

The primary question that needs to be asked is what do you want to do with them?
It is not so much a performance issue as an admin issue. OIDs where created for
Postgres internal system use and leaked out to user space. As a result they
have some shortcomings as detailed in the above article. Given that sequences
are available as number generators, it was decided to encourage/force OIDs to
be for internal system use only. That decision is set and using OIDs on user
tables is setting yourself for future problems.

> Thanks,
> Jayadevan
>




--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: errmsg and multi-byte strings.
Next
From: "Little, Douglas"
Date:
Subject: SQL select return into PSQL variables.