Re: Restore deleted records - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Restore deleted records
Date
Msg-id 20030827123601.GB25066@wolff.to
Whole thread Raw
In response to Re: Restore deleted records  (CoL <col@mportal.hu>)
List pgsql-sql
> Konstantin Petrenko wrote, On 8/26/2003 11:37 AM:
> 
> >Hello.
> >
> >I accidentally deleted some recordes from my table. How can I restore
> >them? Is it possible in 7.3.3?
> if you have a dump, or you are still in a transaction, you can rollback.

I avoided responding earlier, hoping you could get some more detailed help.
Besides recovering from backup (or not committing the transaction if by
some chance you haven't already) you can probably get back data from the
deleted rows if you haven't run a vacuum since committing the delete.
I don't know the specifics of how to do this, but the initial step will
be to shut the database cluster down and make a copy of it before running
vacuum. Once vacuum has been run, the old tuples will start being written
over and you won't have a reliable way to recover the data. If you have
alrerady done a vacuum full, you probably won't be able to much of anything
back.


pgsql-sql by date:

Previous
From: Popeanga Marian
Date:
Subject: script to create a sample database
Next
From: Marco Vezzoli
Date:
Subject: [OT?]*_fsm_* parameters in postgresql.conf: which versions supports them?