pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Сергей А. Фролов <sergey.frolov@smetarik.ru>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14940: Duplicated records inspite of primary key and unique constraint
Date: Mon, 18 Dec 2017 16:50:35 +0100
Message-ID: <1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com> (raw)
In-Reply-To: <ed000df5-0e0a-be02-7c9a-a966c4503ca9@smetarik.ru>
References: <20171201171513.if4pd67kh5sl7u53@alvherre.pgsql>
	<023c1715-3a10-1a4d-6efd-ccb8823fdfb8@smetarik.ru>
	<2e9f0483-f084-53e9-e80b-bf112f9a6053@2ndquadrant.com>
	<ad40dc91-16d6-5486-6d6a-78e32223d907@smetarik.ru>
	<4dc917b7-6edb-01d5-1c91-27ad7e9f12da@2ndquadrant.com>
	<0a05427a-aeb4-05f7-f0c6-1c5052b9f557@smetarik.ru>
	<ed000df5-0e0a-be02-7c9a-a966c4503ca9@smetarik.ru>



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




view thread (16+ messages)  latest in thread

Message-ID: <1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com>
Permalink:  ../1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com/
Also on:    postgresql.org/message-id/1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, sergey.frolov@smetarik.ru, alvherre@alvh.no-ip.org
  Subject: Re: BUG #14940: Duplicated records inspite of primary key and unique constraint
  In-Reply-To: <1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com>
  References: <20171201171513.if4pd67kh5sl7u53@alvherre.pgsql> <023c1715-3a10-1a4d-6efd-ccb8823fdfb8@smetarik.ru> <2e9f0483-f084-53e9-e80b-bf112f9a6053@2ndquadrant.com> <ad40dc91-16d6-5486-6d6a-78e32223d907@smetarik.ru> <4dc917b7-6edb-01d5-1c91-27ad7e9f12da@2ndquadrant.com> <0a05427a-aeb4-05f7-f0c6-1c5052b9f557@smetarik.ru> <ed000df5-0e0a-be02-7c9a-a966c4503ca9@smetarik.ru> <1e30f745-740b-5bf0-3699-a62a04e2a402@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox