undo update - Mailing list pgsql-general

From Ivan
Subject undo update
Date
Msg-id CAHJkLEvb8aOvrK0e9ECSsOY7RHKthts9FJ3mZ-PwjtsJBZGZuw@mail.gmail.com
Whole thread Raw
Responses Re: undo update
Re: undo update
Re: undo update
List pgsql-general
Hi all.

Today an accident happened on one of my databases. I have a table named "payments" with about 5400 rows. I have done a query "update payments set amount = 0; where id in (2354,2353,1232)". Please note the semicolon inside — I missed it =(

Now all my data is lost. And after this happened I realized that backups script is broken (my fault, I know)

I googled a little and have found that there is a chance to restore my data using files in pg_xlog directory. But everybody say about PITR and I don't use it. Also there is a xlogviewer project (from old 2006) that I'm trying to install on my Gentoo right now.

I copied all PGDATA directory and made a dump of all databases. Also I turned off my webserver. Postgres is still running.

Please give me some step-by step guide what should I do next? Is there any chance to restore my data?

I use postgresql 8.4 with default config (autovacuum is commented)

--
______________________________
Yours sincerely, Ivan Kuznetsov aka Kuzma
mailto: kuzma.wm@gmail.com

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: yum repository packages 9.0 and 9.1 libpq conflict
Next
From: Scott Marlowe
Date:
Subject: Re: undo update