Re: Proposed toast info extraction function for disaster recovery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)surnet(dot)cl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposed toast info extraction function for disaster recovery
Date: 2005-06-10 19:26:08
Message-ID: 24810.1118431568@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)surnet(dot)cl> writes:
> Now that I think about it, maybe my problem is not related to TOAST at
> all, but to a corrupted varlena field.

Right.

> So if the corruption does not
> involve toasting, I'm in the same position as before, i.e. I haven't
> found out what is the corrupted tuple.

Hmm. Maybe we need something more like a "lint check" for tables, ie
run through and look for visibly corrupt data, such as obviously
impossible lengths for varlena fields.

(I thought about adding more checks to the standard code paths, such
as heap_deformtuple, but aside from the speed penalty involved, most
of those places don't actually have enough context to issue a useful
error message. A "lint check" could reasonably expect to tell you
by ctid which tuple has a problem.)

Come to think of it, didn't someone already write something close to
this a few years ago?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kaare Rasmussen 2005-06-10 20:59:21 Re: The Contrib Roundup (long)
Previous Message ziga 2005-06-10 19:20:33 Re: Request for Comments: ALTER [OBJECT] SET SCHEMA