Re: Help me recovering data - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Help me recovering data
Date
Msg-id 29052.1108398467@sss.pgh.pa.us
Whole thread Raw
In response to Help me recovering data  ("Kouber Saparev" <postgresql@saparev.com>)
Responses Re: Help me recovering data  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Help me recovering data  (pgsql@mohawksoft.com)
List pgsql-hackers
"Kouber Saparev" <postgresql@saparev.com> writes:
> After asking the guys in the #postgresql@irc.freenode.net channel they told
> me that the reason is the "Transaction ID wraparound", because I have never
> ran VACUUM on the whole database.

> So they proposed to ask here for help. I have stopped the server, but what
> could I do in order to save the data if it's possible at all?

I think you're pretty well screwed as far as getting it *all* back goes,
but you could use pg_resetxlog to back up the NextXID counter enough to
make your tables and databases reappear (and thereby lose the effects of
however many recent transactions you back up over).

Once you've found a NextXID setting you like, I'd suggest an immediate
pg_dumpall/initdb/reload to make sure you have a consistent set of data.
Don't VACUUM, or indeed modify the DB at all, until you have gotten a
satisfactory dump.

Then put in a cron job to do periodic vacuuming ;-)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] WARNING: could not remove database directory
Next
From: "Kouber Saparev"
Date:
Subject: Re: Help me recovering data