Re: Duplicate values found when reindexing unique index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mason Hale" <masonhale(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Duplicate values found when reindexing unique index
Date: 2007-12-30 18:09:08
Message-ID: 13941.1199038148@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Mason Hale" <masonhale(at)gmail(dot)com> writes:
> Given my experience, the reliability of unique indexes is becoming somewhat
> suspect. Please help. ;-)

Well, as in the previous report, there is not enough information here to
offer much chance of understanding what's going wrong.

Have you tried reindexing that other index with the same columns in the
other order? My guess is that there really are duplicate entries in the
table; if so the other one should fail too. If so, please try to
identify the duplicated values, along the lines of

select guid, feed_id from entry group by 1,2 having count(*) > 1

and show us the system columns (ctid,xmin,xmax,cmin,cmax) from the
tuples having duplicate value(s). Note that you should probably disable
indexscan and bitmapscan while doing this probing, so as not to have the
queries use the suspect indexes.

This is 8.2.5 right? Was the DB loaded fresh into 8.2.5, or was it
inherited from previous 8.2.x release(s)?

BTW, what are the datatypes of the index columns?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mason Hale 2007-12-31 02:23:02 Re: Duplicate values found when reindexing unique index
Previous Message Bill Moran 2007-12-30 17:50:58 Re: BUG #3845: tray icon that service is running