On Wed, Jan 27, 2010 at 4:02 AM, Fujii Masao <[email protected]> wrote:
> This is the bug of SR :( I think that walsender wrongly treats the
> WAL-boundary.
The attached patch would fix this bug.
>> pgsql.sr_slave02/logfile:ERROR: could not read xlog records: FATAL: could
>> not open file
>> "pg_xlog/0000000100000001000000FF" (log file 1, segment 255): No such file
>> or directory
>> pgsql.sr_slavery/logfile:ERROR: could not read xlog records: FATAL: could
>> not open file
>> "pg_xlog/0000000100000001000000FF" (log file 1, segment 255): No such file
>> or directory
>
> Also the ReadRecord() or its surrounding functions seem to have treated
> wrongly the WAL-boundary.
Oops! I've misread the log messages. This is not the bug.
Because of the FATAL error from the primary, the standby
seems to just emit an ERROR message, and exit.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
*** a/src/backend/replication/walsender.c
--- b/src/backend/replication/walsender.c
***************
*** 661,666 **** XLogSend(StringInfo outMsg)
--- 661,673 ----
sentPtr = endptr;
+ if (sentPtr.xrecoff >= XLogFileSize)
+ {
+ /* crossing a logid boundary */
+ sentPtr.xlogid += 1;
+ sentPtr.xrecoff = 0;
+ }
+
/*
* Read the log directly into the output buffer to prevent
* extra memcpy calls.
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers