Re: Bad records in table

From: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Bad records in table
Date: 2002-07-03 20:58:16
Message-ID: NNEAICKPNOGDBHNCEDCPCEMFCKAA.pdarley@kinesis-cem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,
Sorry about that. It's 7.2.1 on RedHat 7.2.
I wasn't able to delete; whenever the database touched those records (even
to do a delete) the backend would crash.
It turns out that my problems were much deeper than I thought. There was a
bad dimm in the machine wreaking havoc.
Thanks for the pointer to pg_filedump.
Thanks,
Peter Darley

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Tom Lane
Sent: Tuesday, July 02, 2002 12:00 PM
To: Peter Darley
Cc: Pgsql-General
Subject: Re: [GENERAL] Bad records in table

"Peter Darley" <pdarley(at)kinesis-cem(dot)com> writes:
> I can identify the bad records with a simple perl script that reads all
the
> records sequentially and lets me know which ones crash the back end. Now
> that I know which ones they are, how can I get rid of them?

DELETE?

That might not work very well if the corruption is in toasted fields,
but you haven't given any details that would let us know (not even such
basic info as your PG version).

But before doing that I'd suggest eyeballing the bad data using a tool
such as pg_filedump (see http://sources.redhat.com/rhdb/tools.html).
Look at the "ctid" column of the bad tuples to see what part of the
file you need to dump (ctid is block number and item number). The
pattern of the corruption might give some clue what happened.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jochem van Dieten 2002-07-03 21:01:50 Re: PostgreSQL 7.2.1 on SuSE Linux with Coldfusion MX
Previous Message Manuel W. 2002-07-03 20:57:12 Re: PostgreSQL 7.2.1 on SuSE Linux with Coldfusion MX