473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

OIDS and its 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
Nov 12 '05 #1
2 1758
The OIDs won't hurt except take a little disk space. The only thing is that
if they overflow you run a very small chance one of your DDL statements amy
fail.

This feature has only just become optional and everything worked fine before then.

Hope this helps,

On Fri, Jan 09, 2004 at 04:52:04PM -0800, Amir Khawaja 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!


--
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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ (... have gone from d-i being barely usable even by its developers
anywhere, to being about 20% done. Sweet. And the last 80% usually takes
20% of the time, too, right?) -- Anthony Towns, debian-devel-announce


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAAaX3Y5Twig3Ge+YRAqCHAKCavXObAiQdvknKQPmb9r XqucSklgCgqiN1
V88GB2FfKgPyYc+Aar1syR8=
=vty6
-----END PGP SIGNATURE-----

Nov 12 '05 #2
Hi Amir Khawaja ,
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?


I have done this in one of my project which was using OID'S (i.e tables
were created with OIDS nothing more) thus data inserted into the table
of a database generated new OID's and it was from this list I came to
know that one of the guys table have exausted all the OIDS and to get
around this problem he had to drop recreate the database and again
populate the tables.
From this point onwards I decided to create Tables WITHOUT OIDS and yes
my aplication is running fine.
This was with PostgreSQL 7.3.x and 7.4.x could not tell about the older one.

Even the documentation (Read Chapter 8 of SQL language-> data type )
Says "So, using a user-created table's OID column as a primary key is
discouraged. OIDs are best used only for references to system tables. "
Hope this helps

Regards
Vishal Kashyap

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Hajir Firooz | last post by:
Hi, I am wondering what are the limitations of MS Access 2000 database in terms of number of records per table. Any help will be appreciated.
4
by: Markus Wankus | last post by:
I am about to introduce my company to Solidworks. What are the limitations of the 30 day evaluation copy? I had planned on getting the eval from my VAR, then doing a very small prototype project...
1
by: Amir Khawaja | last post by:
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...
13
by: Jeager | last post by:
Why is it, Microsoft manage to write operating systems and office applications with every bell and whistle facility known to man. Yet, even after years and years of development they still cannot...
0
by: Malcolm Warren | last post by:
While updating to 7.3.4 I note with some alarm the following passage in README.Debian.migration.gz written by Oliver Elphick: "Some schema designs rely on the use of oids as row identifiers. This...
12
by: btober | last post by:
I run three instances of a database, in a typical change-control scenario: Production, QAT, and DEV. The Production database is the "real" data, and we periodically take a back up from Prod and...
1
by: Együd Csaba | last post by:
Hi, I'm winder if I can change the clause 'WITH OIDS' to 'WITHOUT OIDS' on a table without recreating it (eg. usong ALTER TABLE). The problem is that my tables are very big, and I do not need the...
1
by: Eran.Yasso | last post by:
Hi all, Is there a way to send OIDs request/set to miniport drivers? I understand that the only way is using WMI. Which method in WMI should be used? thanks.
1
by: ntech | last post by:
Hello, i am facing a problem. I am using postgresql database in Linux. After taking the dump of any postgresql database, when i restore the dump file into a new database, i dont get any oids. so can...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.