By the way about the v3 patch, +#define InvalidXLogSegNo ((XLogSegNo) 0xFFFFFFFFFFFFFFFF)
Like InvalidXLogRecPtr, the first valid segment number is 1 so we can use 0 as InvalidXLogSegNo. BootStrapXLOG(): /* Create first XLOG segment file */ openLogFile = XLogFileInit(1); KeepLogSeg(): /* avoid underflow, don't go below 1 */ if (currSegNo <= keep_segs) segno = 1; regards. -- Kyotaro Horiguchi NTT Open Source Software Center