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 02:34:19
Message-ID: Pine.LNX.4.44.0408132231290.17597-100000@freewebz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

It appears that I can select the rows, but not delete or update them.

# select ctid from files where ctid = '(53101,30)';
ctid
------------
(53101,30)
(1 row)

# delete from files where ctid = '(53101,30)';
DELETE 0
# update files set fileid = 1000 where ctid = '(53101,30)';
UPDATE 0
#

-Zeki

On Fri, 13 Aug 2004, Tom Lane wrote:

> Zeki Mokhtarzada <zeki(at)freewebz(dot)com> writes:
> > 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.
>
> Not sure. xmin=2 (FrozenXid) implies that those rows have been like
> that for a good long time (~ 1 billion transactions).
>
> > But you never stated how to delete the duplicate rows. Any suggestions?
>
> You can select 'em by ctid, viz WHERE ctid = '(53101,30)'
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-14 02:50:26 Re: Primary key duplicates
Previous Message Tom Lane 2004-08-14 02:22:11 Re: Primary key duplicates