Re: [HACKERS] ReadRecord, EndRecPtr and XLOG_SWITCH

2007-07-09 Thread Florian G. Pflug
Florian G. Pflug wrote: Please disregard - I was confusing xlogid with xlog segments, so most of my mail was nonsense. I've fixed my problem by storing not the EndRecPtr, but rather the ReadRecPtr, in shmem and rereading the last already applied record in my bgreplay process. Then I can just us

[HACKERS] ReadRecord, EndRecPtr and XLOG_SWITCH

2007-07-09 Thread Florian G. Pflug
Hi When ReadRecord encounters an XLOG_SWITCH record, it does EndRecPtr.xrecoff += XLogSegSize - 1; EndRecPtr.xrecoff -= EndRecPtr.xrecoff % XLogSegSize; which seems to set xrecoff to either 0 (if it was 0) or to XLogSegSize (if it was > 0). Note that xrecoff == XLogSegSize is kind of "denormaliz