470,581 Members | 2,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

OIDS and their limitations

Hi Everyone,

I have a rather trivial (I hope) question about OID types and
PostgreSQL. Since PostgreSQL creates tables "WITH OIDS" by default, I'm
wondering if it is bad practice to allow the default behaviour. For
example, if I have a database with 60+ tables (all tables have their own
PK that is not of type OID) and all of them have an OID field created by
PostgreSQL by default, will this be problematic in the long run? For
example, if I have 30 tables with records greater than 500,000, will
PostgreSQL choke?

Thank you in advance for any information you can provide!
--
Amir Khawaja.

----------------------------------
Rules are written for those who lack the ability to truly reason, But
for those who can, the rules become nothing more than guidelines, And
live their lives governed not by rules but by reason.
- James McGuigan
Jul 19 '05 #1
1 1611
In article <JAjLb.53093$m83.52185@fed1read01>,
Amir Khawaja <am**@gorebels.net> wrote:
Hi Everyone,

I have a rather trivial (I hope) question about OID types and
PostgreSQL. Since PostgreSQL creates tables "WITH OIDS" by default, I'm
wondering if it is bad practice to allow the default behaviour. For
example, if I have a database with 60+ tables (all tables have their own
PK that is not of type OID) and all of them have an OID field created by
PostgreSQL by default, will this be problematic in the long run? For
example, if I have 30 tables with records greater than 500,000, will
PostgreSQL choke?

Thank you in advance for any information you can provide!


The documentation indicates that the oids will wrap around, so this
should not be a problem - I think it goes up to 4 billion, and you are
a long way from that with your 30 tables * 0.5 million.

I find the oid's very handy to make sure I am deleting the correct
records when I need to do a tricky delete, at least this is true when I
am not using unique keys - i.e., an oid acts like an unique key in that
sense (unless a table had more than 4 billion rows). (BTW, the pgsql
folks are probably using the American definition of "billion" = 1x10**9,
not the British: 1x10**12.

Boyd

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Hajir Firooz | last post: by
reply views Thread by Malcolm Warren | last post: by
12 posts views Thread by btober | last post: by
2 posts views Thread by Amir Khawaja | last post: by
6 posts views Thread by studen77 | last post: by
1 post views Thread by Egyd Csaba | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.