hi, hackers!
If someone can, please help me!

I deleted by an accident some vital data  from a table, and now I'm
wondering  is it possible to "undelete" at least some of  deleted records
until they are not finally sweeped out with vacuum. If yes, how do it?

TIA, 
Aleksey.




Thu, 18 Feb 1999 19:32:07 +0200 (IST)
Postgres DBA <postgres@nest.bistbn.com>
UnDelete?
Postgres DBA wrote:
> 
> hi, hackers!
> If someone can, please help me!
> 
> I deleted by an accident some vital data  from a table, and now I'm
> wondering  is it possible to "undelete" at least some of  deleted records
> until they are not finally sweeped out with vacuum. If yes, how do it?

This used to be the case on older verions of Postgres, then you had to 
only give the time qualification of the period for which the data was
valid.
For some reason (performance ?) this feature was removed ;(

And I'm pretty sure that the data is still inside the tables, so some 
creative work with hex editor inside a _copy_ of the table would be 
able to get at it. 
So as a first thing I advise you to make a copy of your database 
backend directory, at least of the tables that contain your data.
(the db directory is the one you gave to postmaster at startup +
database name,
the datafiles for tables are named exactly same as tables)

Next, get the programmers docs (and/or read code ;), and start digging.

If you come up with some tools for salvaging lost data, share them :)

---------------
Hannu

Thu, 18 Feb 1999 20:36:20 +0200
Hannu Krosing <hannu@trust.ee>
Re: [HACKERS] UnDelete?