Hi,
On Mon, Sep 21, 2009 at 4:51 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I've pushed that to 'replication-orig' branch in my git
> repository, attached is the same as a diff against your SR_0914.patch.
The following changes about crossing a xlogid boundary seem wrong,
which would break the management of some XLOG positions.
> ! /* Update state for read */
> ! tmp = recptr.xrecoff + byteswritten;
> ! if (tmp < recptr.xrecoff)
> ! recptr.xlogid++; /* overflow */
> ! recptr.xrecoff = tmp;
> ! endptr.xrecoff += MAX_SEND_SIZE;
> ! if(endptr.xrecoff < startptr.xrecoff)
> ! endptr.xlogid++; /* xrecoff overflowed */
> ! if (endptr.xlogid != startptr.xlogid)
> {
> ! Assert(endptr.xlogid == startptr.xlogid + 1);
> ! nbytes = (0xffffffff - endptr.xrecoff) + startptr.xrecoff;
> ! }
The size of a logical XLOG file is 0xff000000. So, even if xrecoff has
not been overflowed yet, we might need to cross a xlogid boundary.
The xrecoff should be compared with XLogFileSize, I think. Can I fix those?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center