Skip site navigation (1) Skip section navigation (2)

Re: undo delete w/ transaction?

From: Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI>
To: "Joshua b(dot) Jore" <josh(at)kitten(dot)greentechnologist(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: undo delete w/ transaction?
Date: 2001-10-25 12:47:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Thu, Oct 25, 2001 at 07:11:39AM -0500, Joshua b. Jore wrote:
> So I did a bad thing and did a bad DELETE command and deleted *all* the
> records. I also goofed by not doing that in a transaction. Is there any
> way to undo the change? I stopped the daemon right after I broke it.
The easiest way is to restore the db from your backups. (You have backups don't you?)

If that is not possible for some weird reason the data is not deleted just
marked to be deleted. If you did *nothing* to that table it might be possible
to resque them as described in
(Do wal-logs change this in anyway?)

The first thing to do is to take a backup of the database dir. If the log trick fails
then study the table format use a hex editor, write a tool to do the undelete and
share it with us.

- Einar Karttunen

In response to


pgsql-novice by date

Next:From: Per AronssonDate: 2001-10-25 14:04:00
Subject: UNICODE
Previous:From: Joshua b. JoreDate: 2001-10-25 12:11:39
Subject: undo delete w/ transaction?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group