> 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 past end 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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to