Re: pg_clog and pg_xlog empty, postgresql refuses to start

From: "Glen Parker" <glenebob(at)nwlink(dot)com>
To: "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_clog and pg_xlog empty, postgresql refuses to start
Date: 2004-08-17 01:08:13
Message-ID: AJEKKAIECKNMBCEKADJPGELOCMAA.glenebob@nwlink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > First things first: Postgresql 8.4.2 on Fedora Core 2 X86.
>
> I take it this message fell through a time warp ;-)

Yep :-)
7.4.2.

>> ...I cleaned out pg_clog and pg_xlog...
>
> That was probably not your best first move...

This is actually a development copy of our real database, so worst-case
scenario is a dump/restore. No big deal.

> 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.

OK, all the files I deleted, I really deleted... See? I'm on a roll today.

pg_resetxlog did the trick, mostly; the server starts again and I seem to be
back to where I started...

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

I started out, and am now once again, getting this error when issuing a
delete query in psql:

ERROR: could not access status of transaction 655360
DETAIL: could not read from file "/usr/local/var/lib/pgsql32/pg_clog/0000"
at offset 163840: Success

I am now also getting this error when vacuuming a different table:
ERROR: catalog is missing 2 attribute(s) for relid 25297932

Hmm, whatever happened over the weekend that caused this machine to be *off*
this morning must have been a bit nasty... Dump/restore may be my only
option.

Thx again,
Glen Parker

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Kryltsov 2004-08-17 02:31:21 Problems using count() with a join
Previous Message Bruce Momjian 2004-08-17 00:48:00 Re: Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?