Re: Primary key duplicates

From: Zeki Mokhtarzada <zeki(at)freewebz(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Primary key duplicates
Date: 2004-08-14 00:31:24
Message-ID: Pine.LNX.4.44.0408131924020.2484-100000@freewebz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 13 Aug 2004, Tom Lane wrote:

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

ctid | xmin | cmin | xmax | oid | fileid | userid
--------------+------------+------------+------------+----------+---------+---------
(53101,30) | 2 | 1478674026 | 1478674026 | 1573737 | 3787433 | 1898598
(53101,39) | 2 | 0 | 0 | 1573737 | 3787433 | 1898598

> 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

I've run the query with set enable_indexscan =off so that rules out an
index problem.

> valid anyway.) Have you had any crashes or other strange behavior lately?

The system is running on a Dell PowerEdge 2650 running RedHat 8. We had a
kernel halt about two weeks ago that was caused by one of our disk mirrors
failing. It could be that these problems were caused at that point in
time and are just being noticed now.

It looks like you've seen this problem before:

http://archives.postgresql.org/pgsql-bugs/2003-12/msg00174.php

But you never stated how to delete the duplicate rows. Any suggestions?
Also, where can I find documentation on the purpose and values of the
ctid, oid, xmin, xmax, cmin, cmax columns?

Thanks!

-Zeki

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-14 02:22:11 Re: Primary key duplicates
Previous Message Tom Lane 2004-08-14 00:13:23 Re: Sequence problem in stresstest on 8.0-beta1 (windows)