Re: [COMMITTERS] recover deleted records - Mailing list pgsql-general

From Scott Bailey
Subject Re: [COMMITTERS] recover deleted records
Date
Msg-id 4B0C3359.2050505@comcast.net
Whole thread Raw
In response to Re: [COMMITTERS] recover deleted records  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
Pavel Stehule wrote:
> 2009/11/24 Allan Morris Caras <amscaras@yahoo.com>:
>> Hi,
>>
>> I tried to test it but it says couldn't find class 'pg_attribute'
>
> It is strange - but this software isn't maintained long time, and it's
> not actual.
>
> so it is a bad
>
> Pavel
>
>> When I tried looking into the table that deleted records from, it didn't revert back what I've deleted.
>>
>> Any clues?

Easiest is to restore from backup ;)

It would be cool if there was an XID override function. If you could for
instance say "run this query, but I want you to use the XID immediately
before the one that wiped out my table," then you could see all of those
deleted rows. To my knowledge, no such functionality exists, but it
might not be that hard.

And if you were really brave, you could copy the binary file for that
table and walk it removing the xmax values that matched the offending
transaction. There may be problems with the freespace map or other
issues that I'm not aware of, but I'd probably at least try it if I was
going to lose my job or the company lose mega $ over it.

Scott Bailey


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Updating column on row update
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Updating column on row update