Re: [HACKERS] UnDelete?

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Postgres DBA <postgres(at)nest(dot)bistbn(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] UnDelete?
Date: 1999-02-18 18:36:20
Message-ID: 36CC5DA4.A1AD6645@trust.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

  • UnDelete? at 1999-02-18 17:32:07 from Postgres DBA

Browse pgsql-hackers by date

  From Date Subject
Next Message Inkster, Douglas 1999-02-18 18:39:26 RE: list limit for IN predicate?
Previous Message Postgres DBA 1999-02-18 17:32:07 UnDelete?