By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,782 Members | 1,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,782 IT Pros & Developers. It's quick & easy.

OIDS and their limitations

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.