pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jaime soler <jaime.soler@gmail.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Artem Tomyuk *EXTERN* <admin@leboutique.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Insert in table with UNIQUE index
Date: Mon, 01 Feb 2016 13:55:43 +0100
Message-ID: <1454331343.5847.98.camel@gmail.com> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B537D9AF2@ntex2010i.host.magwien.gv.at>
References: <CANYYVqKwbPTj8JHS1MqYVnXzVtAr25bO+eEBWceCz2npoW0Vbg@mail.gmail.com>
	<A737B7A37273E048B164557ADEF4A58B537D9AF2@ntex2010i.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

El mié, 27-01-2016 a las 14:12 +0000, Albe Laurenz escribió:
> Artem Tomyuk wrote:
> > I have a table with unique index with 2 exactly the same rows.
> > How it can be possible?
> > 
> > 
> > CREATE TABLE _inforgchngr6716_test
> > (
> >   _nodetref bytea NOT NULL,
> >   _noderref bytea NOT NULL,
> >   _messageno numeric(10,0)
> > )
> > WITH (
> >   OIDS=FALSE
> > );
> > ALTER TABLE _inforgchngr6716_test
> >   OWNER TO postgres;
> > 
> > -- Index: _inforg6716_bynodemsg_rn_test
> > 
> > -- DROP INDEX _inforg6716_bynodemsg_rn_test;
> > 
> > CREATE UNIQUE INDEX _inforg6716_bynodemsg_rn_test
> >   ON _inforgchngr6716_test
> >   USING btree
> >   (_nodetref, _noderref, _messageno);
> 
> Maybe index corruption.
> Did you have any crashes?

To discard a index corruption problem, try to select duplicates row
setting enable_indexscan and enable_bitmapscan to false and check if
you get 1 or 2 rows, if you get 2 -> I'll follow Albe advide and
reindex 
> 
> Do you get an error when you
>    REINDEX INDEX _inforg6716_bynodemsg_rn_test;
> 
> Yours,
> Laurenz Albe
> 


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



view thread (6+ messages)

Message-ID: <1454331343.5847.98.camel@gmail.com>
Permalink:  ../1454331343.5847.98.camel@gmail.com/
Also on:    postgresql.org/message-id/1454331343.5847.98.camel@gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jaime.soler@gmail.com, laurenz.albe@wien.gv.at, admin@leboutique.com
  Subject: Re: Insert in table with UNIQUE index
  In-Reply-To: <1454331343.5847.98.camel@gmail.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