Re: pg_clog and pg_xlog empty, postgresql refuses to start - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_clog and pg_xlog empty, postgresql refuses to start
Date
Msg-id 24233.1092703482@sss.pgh.pa.us
Whole thread Raw
In response to pg_clog and pg_xlog empty, postgresql refuses to start  ("Glen Parker" <glenebob@nwlink.com>)
Responses Re: pg_clog and pg_xlog empty, postgresql refuses to start  ("Glen Parker" <glenebob@nwlink.com>)
List pgsql-general
"Glen Parker" <glenebob@nwlink.com> writes:
> First things first: Postgresql 8.4.2 on Fedora Core 2 X86.

I take it this message fell through a time warp ;-)

> Something seems to have happened to my pg_xlog and pg_clog directories after
> (I believe) a power outage.  In the course of trying to figure out why the
> server wouldn't start, I cleaned out pg_clog and pg_xlog, in an obviously
> vain attempt to reset things.  I was under the impression that the server
> could start without those files.  Now I seem to be stuck.

That was probably not your best first move...

I'd put back the clog files if at all possible.  If not you can
substitute zero-filled 256K files for each clog file the server
complains about not finding, but realize that you *will* be losing
transactions in whole or in part.

As for pg_xlog, you can cons up dummy xlog contents with pg_resetxlog,
but again you'd be better off with the real thing.  The dummy files will
not be capable of replaying whatever happened since your last checkpoint.

What failures were you getting *before* you decided to try this?

            regards, tom lane

pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: Thousands of parallel connections
Next
From: Bruce Momjian
Date:
Subject: Re: Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?