Re: Zeroing single tuple in data file.

From: Matthew Walden <matthew(dot)walden(at)bcs(dot)org>
To: Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Zeroing single tuple in data file.
Date: 2010-11-22 08:54:14
Message-ID: AANLkTi=kXzF=B+cRzXcXrj9-S1WZmxtu=ukaADMXr9T=@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

And the \d+ on users? Also would you mind pasting the output exactly as it
is appears on screen, assuming it is in English?

I'm trying to build up a picture here of how many problems you have and
whether they can be fixed conventionally with the database interface or
whether you need to start messing around with the data files. If the case
is the latter, you won't be able to just remove the single rows that are
causing the problem - you will loose full pages. It could be that it is
actually a corrupt index rather than the table - in this case the \d+ will
help me assist you in disabling that index.

You can take a look at this guide if you suspect block corruption -

http://blog.endpoint.com/2010/06/tracking-down-database-corruption-with.html

BUT I would try everything else first. You will loose data if you follow
that approach (but it may not be avoidable). If your database is a
production one (I don't know the environment you are using this database in)
then this would need to be a last ditch attempt to salvage otherwise lost
data. In any case it sounds like you have some kind of hardware issue and
should consider a full backup restore if possible and then afterwards
running frequent ANALYZE; commands to quickly detect further corruptions.

On Mon, Nov 22, 2010 at 7:36 AM, Lukasz Brodziak
<lukasz(dot)brodziak(at)gmail(dot)com>wrote:

> And the version is 8.2.4
>
> 2010/11/22 Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>:
> > Hello,
> >
> > I got access to corrupted DB... The SELECT COUNT(*) FROM users where
> > id_usr IS NULL returned error of invalid page header in one of the
> > blocks...
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Lukasz Brodziak 2010-11-22 08:56:37 Re: Zeroing single tuple in data file.
Previous Message Khangelani Gama 2010-11-22 08:30:49 Postgres database : Out of balance problem from the same table