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

Postgres Violates Primary key and OID

P: 1
Postgres voilates Primary key .I would be able to find duplicates on database.
Also it voilates the OID.I dont know the reason .it happend only once on DB.
Please suggest me is there a soultion to avoid this on future.

I have manually deleted the records then it started to work fine. During this time.
I have lost few records in database also few autoincremented ID got lappsed.
please advice me...

May 8 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 534
Postgres voilates Primary key. I would be able to find duplicates on database.
Are you sure?
Run VACUUM ANALYZE and VACUUM FULL on the database.
Watch for warnings and errors, which you may get if you have a corrupted database.
If you did not get any errors post your table definition and example of how you get duplicate records.

Also it voilates the OID.
What exactly do you mean by that?
If I remember correctly OIDs are not guaranteed to be unique in the global scope. Also at some point they can wrap the values on very large tables.

When you report a problem like this please provide the platform and the database version you use.
May 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.