Re: help with data recovery from injected UPDATE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gus Gutoski <shared(dot)entanglement(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: help with data recovery from injected UPDATE
Date: 2009-06-10 22:28:31
Message-ID: 15492.1244672911@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gus Gutoski <shared(dot)entanglement(at)gmail(dot)com> writes:
> Naturally then, *every* record in the database has its "foreign_id"
> field set to 2 and its "coin" field set to 50. I *really* need to
> recover that "foreign_id" field. (As its name suggests, that field is
> a foreign key into a different table.)

Well, in principle you could roll back that transaction, as long as the
old versions of the rows are still there and haven't been vacuumed away.
This being 8.1, if you haven't turned on autovacuum there is some chance
of that. Shut down any manual vacuuming setup you may have *NOW*,
and then go trawl the pgsql archives for discussions of data recovery.
You most likely will need to find or write a special-purpose program
to change the xmin/xmax fields on the modified rows.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Phil Longstaff 2009-06-11 00:50:43 Libpq on windows
Previous Message Tom Lane 2009-06-10 20:51:44 Re: Different handling of PL/pgSQL for-loop variables in 8.3.7 vs. 8.2.7 ???