Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave
| От | Michael Paquier |
|---|---|
| Тема | Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave |
| Дата | |
| Msg-id | CAB7nPqTF67wan1yijfCJd7f+Go501TqekHCVUcoARPNW5Mf7QQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave (Andres Freund <andres@2ndquadrant.com>) |
| Список | pgsql-hackers |
On Fri, Jan 18, 2013 at 8:48 AM, Andres Freund <andres@2ndquadrant.com> wrote:
-- split off?).Can you reproduce that one with 7fcbf6a^ (i.e before xlogreader got
Yes, it is reproducible before the xlog reader split.
Just an additional report, the master jumps correctly to the new timeline.
Just an additional report, the master jumps correctly to the new timeline.
> The replication delays are still here.That one is caused by this nice bug, courtesy of yours truly:
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 90ba32e..1174493 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8874,7 +8874,7 @@ retry:
/* See if we need to retrieve more data */
if (readFile < 0 ||
(readSource == XLOG_FROM_STREAM &&
- receivedUpto <= targetPagePtr + reqLen))
+ receivedUpto < targetPagePtr + reqLen))
{
if (StandbyMode)
{
I didn't notice because I had a testscript inserting stuff continuously
and it cause at most lagging by one record...
This fix is indeed working.
Michael Paquier
http://michael.otacoo.com
В списке pgsql-hackers по дате отправления: