Re: How to access deleted but not vacuum'ed tuples? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: How to access deleted but not vacuum'ed tuples?
Date
Msg-id 20021217055744.GA10708@svana.org
Whole thread Raw
In response to How to access deleted but not vacuum'ed tuples?  (Robert <robert@robert.cz>)
List pgsql-general
On Mon, Dec 16, 2002 at 02:47:02PM +0100, Robert wrote:
> Hi,
>
>  I've accidentaly updated too much of my table and I need to un-update
> it :-( Old tuples are supposed to be kept in the db till I run vacuum so
> I should be able to manually fix it - but how to access old versions of
> the deleted/updated tuples? Thanks for your help.

As a rule, it's impossible. You state that the tuples may kept until the
next vacuum, but that's not necessarily true. Space could be reused at any
time.

I suggest backups.

You may be able to recover by reading the data files directly but it's not
recommended. Look around for disk dumping programs that read postgres files.
pgfsck is one.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ORDER BY random() LIMIT 1 slowness
Next
From: Jean-Christian Imbeault
Date:
Subject: current_timestamp without TZ in CREATE table