RE: [BUGS] Loosing files after backend crash - Mailing list pgsql-hackers

From Mikheev, Vadim
Subject RE: [BUGS] Loosing files after backend crash
Date
Msg-id 8F4C99C66D04D4118F580090272A7A234D337C@sectorbase1.sectorbase.com
Whole thread Raw
List pgsql-hackers
> 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.

Ok, this one is easy to fix. From Konstantin startup log:

...
> REDO @ 0/220716996; LSN 0/220717056: ...                           ^^^^^^^^^
End of 8K page!

...
> INSERT @ 0/220717064: prev 0/220716996; ... checkpoint ...
> XLogFlush: rqst 0/220717128; wrt 0/220717056; flsh 0/220717056

Checkpoint is the first record on new page. To satisfy
   if (!XLByteLT(LogwrtResult.Write, XLogCtl->xlblocks[Write->curridx]))       elog(STOP, "XLogWrite: write request is
pastend of log");
 

in XLogWrite() we have to initialize XLogCtl->xlblocks[0] to the next page
(where checkpoint will go) in StartupXLOG().

Still not related to original problem. But this is second bug discovered
since issue was rised -:)

Vadim


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Configure problems on Solaris 2.7, pgsql 7.02 and 7.03
Next
From: Adriaan Joubert
Date:
Subject: Re: ecpg long int problem on alpha + fix