Re: BUG #14940: Duplicated records inspite of primary key and uniqueconstraint - Mailing list pgsql-bugs

From Tomas Vondra
Subject Re: BUG #14940: Duplicated records inspite of primary key and uniqueconstraint
Date
Msg-id 1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com
Whole thread Raw
In response to Re: BUG #14940: Duplicated records inspite of primary key and uniqueconstraint  (Сергей А. Фролов<sergey.frolov@smetarik.ru>)
List pgsql-bugs

On 12/18/2017 04:28 PM, Сергей А. Фролов wrote:
> Hi,
> 
> I have got a VirtualBox with Debian  8.3 and have installed PG 9.6 and
> amcheck:
> 
> select version ()
> "PostgreSQL 9.6.6 on i686-pc-linux-gnu, compiled by gcc (Debian
> 4.9.2-10) 4.9.2, 32-bit"
> 
> No errors were raised by amcheck:
> SELECT bt_index_check(index => indexrelid, heapallindexed =>
> true),bt_index_parent_check(index =>indexrelid), relname, indexrelname
>     FROM pg_stat_all_indexes
>     WHERE indexrelname in ('pk_nb_basedtl','unq_nb_basedtl_basenorm');
> 
> "";"";"nb_basedtl";"pk_nb_basedtl"
> "";"";"nb_basedtl";"unq_nb_basedtl_basenorm"
> 
> BUT duplicate rows were restored via pg_dump/pg_restore.
> select ctid,xmin,xmax, id, base_id, norm_id from nb.nb_basedtl where id
> =11658502;
> 
> (0,49);5513;0;11658502;269;46203
> (0,49);5518;0;11658502;269;46203
> (0,49);5519;0;11658502;269;46203
> 

So, can you create a reproducer? That is, share the pg_dump export (for
this one table) which we could use to reproduce the issue? That would
make investigation so much simpler.

regard

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Change to bug reporting form
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #14940: Duplicated records inspite of primary key and unique constraint