Re: [BUGS] Loosing files after backend crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: KS <ks(at)tcnet(dot)ru>
Cc: "'Mikheev, Vadim'" <vmikheev(at)SECTORBASE(dot)COM>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] Loosing files after backend crash
Date: 2001-04-04 22:38:18
Message-ID: 12826.986423898@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

KS <ks(at)tcnet(dot)ru> writes:
> Well, bad news. After a few more tries to crash the backend, the whole
> postmaster crashed and didn't rise back.
> It fails to start up reporting "Apr 4 18:53:05 wale postgres[71618]: [9]
> FATAL 2: XLogWrite: write request is past end of log" to syslog.

Ugh.

> And the last line of errlog sounds like "/usr/local/pgsql/bin/postmaster:
> Startup proc 72905 exited with status 512 - abort"
> I wanted to ask, if I need to re-initdb or there are some other ways to fix
> the problem?

You can use contrib/pg_resetxlog to remove the damaged WAL log, which
will allow the postmaster to start up. If you have the space, please
first save the contents of $PGDATA (the whole tree if possible, else at
least pg_xlog directory) for later analysis. Note that the database
might not be completely consistent after you zap the WAL log --- safest
bet would be to dump the data, look it over for problems, then initdb
and restore.

> Shall I send you it's code? (It's 23 Kbytes big).

Please. 23K is no problem.

BTW, exactly which version of Postgres are you working with --- is it a
CVS snapshot, or a beta or RC release, and if so which one?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Tiffin 2001-04-04 22:47:30 Regression failed Mac OSX
Previous Message KS 2001-04-04 22:25:29 RE: [BUGS] Loosing files after backend crash