Zeki Mokhtarzada <[EMAIL PROTECTED]> writes:
> Notice that 3787433 is duplicated.  How could this have happened if that 
> column is flagged as the primary key.  Even more interesting:

> select oid, fileid, userid from files where userid = 1898598 order by 
> fileid;
>    oid    | fileid  | userid  
> ----------+---------+---------
>   1573737 | 3787433 | 1898598
>   1573737 | 3787433 | 1898598 
>   1573820 | 3787563 | 1898598 
>  18612041 | 9554275 | 1898598

It would be interesting to see the ctid, xmin, cmin, and xmax fields
as well.

> I suspect a corrupt index is at fault here.

Possibly, but the duplicate OID entries suggest that a row was updated
and then for some reason the old version appears to still be valid.
(Or an attempted update was rolled back, but the new version got marked
valid anyway.)  Have you had any crashes or other strange behavior lately?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to