Re: BUG #14874: Dublicate values in primary key

From: CONCHY Elisabeth <elisabeth(dot)conchy(at)dgfip(dot)finances(dot)gouv(dot)fr>
To: pg(at)bowt(dot)ie
Cc: Henri KY <sideuxb-ky(dot)consultant(at)dgfip(dot)finances(dot)gouv(dot)fr>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14874: Dublicate values in primary key
Date: 2017-10-27 11:01:48
Message-ID: 23894_1509102109_59F3121D_23894_334_2_59F3121C.3040507@dgfip.finances.gouv.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message dmitriy 2017-10-27 13:21:52 BUG #14877: DISCARD ALL incorrectly resets user parameters
Previous Message joan_he@189.cn 2017-10-27 09:46:20 Parameters bgwriter_lru_maxpages Comment error?