Re: [COMMITTERS] recover deleted records

From: Scott Bailey <artacus(at)comcast(dot)net>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [COMMITTERS] recover deleted records
Date: 2009-11-24 19:26:17
Message-ID: 4B0C3359.2050505@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-general

Pavel Stehule wrote:
> 2009/11/24 Allan Morris Caras <amscaras(at)yahoo(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-11-25 20:26:31 pgsql: Simplify psql's new linestyle behavior to default to
Previous Message Peter Eisentraut 2009-11-24 19:21:15 pgsql: Fix syntax in extract() examples Author: Erik Rijkers

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-11-24 19:29:20 Re: [HACKERS] Updating column on row update
Previous Message Tom Lane 2009-11-24 19:23:06 Re: [HACKERS] Updating column on row update