Re: Database is in recovery mode.

From: Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Database is in recovery mode.
Date: 2011-11-30 14:56:42
Message-ID: CAGWYGjXAxpdTbwZHjeAxy_rKxr7d5E00eiHOZeGzCd1KEupOkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

Thank You for the reply. I managed to delete the row the way below:
1. Using EMS Manager for PostgreSQL I selected all the rows except the
corrupted one.
2. Extracted the data to INSERT script
3. SET zero_damaged_pages TO true; VACUUM FULL table;
4. DROP/CREATE
5. INSERT script without the corrupted row
6. INSERT script for the missing row created with EMS from the las
uncorrupted data folder

Everything went as predicted and the table is ok now.

2011/11/30 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com> writes:
> > I have isolated the corrupted row of data and isolated column which
> > constains bad data. Unfortunately I can't do anything with the row. I
> have
> > an older backup of the db which contains correct row. Is there a way I
> can
> > restore only the given row or replace it in the file ( I also located the
> > row on the page).
>
> You haven't shown us exactly how it's failing, but depending on what
> sort of corruption this is, you might be able to delete the damaged row
> with
> DELETE FROM table WHERE ctid = '...';
>
> regards, tom lane
>

--
Łukasz Brodziak
"Do you bury me when I'm gone
Do you teach me while I'm here
Just as soon I belong
Then it's time I disappear"

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Craig James 2011-11-30 18:08:42 Re: Deadlock on "select ... for update"?
Previous Message Tom Lane 2011-11-30 14:40:43 Re: Database is in recovery mode.