Re: [BUGS] BUG #14874: Dublicate values in primary key - Mailing list pgsql-bugs

From CONCHY Elisabeth
Subject Re: [BUGS] BUG #14874: Dublicate values in primary key
Date
Msg-id 23894_1509102109_59F3121D_23894_334_2_59F3121C.3040507@dgfip.finances.gouv.fr
Whole thread Raw
Responses Re: [BUGS] BUG #14874: Dublicate values in primary key
List pgsql-bugs
Hello,
   Thank you for your answer on  PostgreSQL mailing list "pgsql-bugs".   I work with Henri Ky who is out of office
today,and I ditn't find 
 
the way to answer on the web site.   So, I write to you directly, but feel free to add this text on the site.
_______________________________________________________________________

>>    "You'll clearly need to fix the problem by hand, resolving which rows

>> to keep. Rows can be deleted by using the hidden ctid column."

   We can't just delete the rows, because the data are different. The 
id only is duplicate.  It looks as if the sequence was requested only once, and used twice 
for inserting new rows.
   The id has for default value :    

nextval('<sequence>')


and is defined as primary key by :
ALTER TABLE <table> ADD CONSTRAINT <table>_pk PRIMARY KEY
(id) USING INDEX TABLESPACE schema_idx;

Yesterday night, we found out that the problem affects not only one 
table, but 5.

We would like to understand how this is possible, whithout PosgreSQL 
detecting any error.

Can we be sure that couldn't happen again, if we upgrade the version (to 
9.4.12 for example) ?

-- 
Best Regards,
_____________________________________
Elisabeth Conchy
Inspectrice des Finances Publiques
DGFiP/SSI/SI-2B/NESSIE/SoLiPOD




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: "joan_he@189.cn"
Date:
Subject: [BUGS] Parameters bgwriter_lru_maxpages Comment error?
Next
From: dmitriy@riabov.info
Date:
Subject: [BUGS] BUG #14877: DISCARD ALL incorrectly resets user parameters