Re: Help me recovering data

From: pgsql(at)mohawksoft(dot)com
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Kouber Saparev" <postgresql(at)saparev(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Help me recovering data
Date: 2005-02-14 18:02:05
Message-ID: 16509.24.91.171.78.1108404125.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> 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 ;-)
>
> This might seem like a stupid question, but since this is a massive data
> loss potential in PostgreSQL, what's so hard about having the
> checkpointer or something check the transaction counter when it runs and
> either issue a db-wide vacuum if it's about to wrap, or simply
> disallow any new transactions?
>
> I think people'd rather their db just stopped accepting new transactions
> rather than just losing data...
>

I would certainly prefer the system to issue an error and stop working
than complete data loss.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fuhr 2005-02-14 18:12:55 Re: Schema name of function
Previous Message pgsql 2005-02-14 17:59:49 Re: Help me recovering data