Postgres Violates Primary key and OID

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kcsriram80
    New Member
    • May 2007
    • 1

    #1

    Postgres Violates Primary key and OID

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


    Regards,
    Sriram
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    Originally posted by kcsriram80
    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.

    Originally posted by kcsriram80
    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.

    Comment

    Working...