Re: Transaction logs gone, how to restart? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Transaction logs gone, how to restart?
Date
Msg-id 25549.1078847466@sss.pgh.pa.us
Whole thread Raw
In response to Transaction logs gone, how to restart?  (Jeff Boes <jboes@nexcerpt.com>)
List pgsql-admin
Jeff Boes <jboes@nexcerpt.com> writes:
> We backed up our test server yesterday (Pg 7.4.1) as the first step in switching
> from Red Hat 7 to Whitebox. However, we failed to back up the transaction and
> commit logs. Now that the OS and database are back to where they were, we get
> this message on attempting to restart:

> LOG:  could not open file "/usr/local/pgsql/data/pg_xlog/00000041000000EE" (log
> file 65, segment 238): No such file or directory

Urgh.  If you shut down the postmaster cleanly before backing up, then
you don't really need pg_xlog --- running pg_resetxlog will get you out
of the above problem.  However, if you did not save pg_clog then I fear
you are well and truly screwed.

How long ago was your last complete (database-wide) VACUUM?  If it was
just before shutdown then you may be able to achieve some semblance of
a consistent database, but if it was awhile ago then you do not have
a database but just a pile of bits :-(

            regards, tom lane

pgsql-admin by date:

Previous
From: Jeff Boes
Date:
Subject: Transaction logs gone, how to restart?
Next
From: Louie Kwan
Date:
Subject: Colors in vim