From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave |
Date: | 2013-01-18 00:33:21 |
Message-ID: | CAB7nPqTF67wan1yijfCJd7f+Go501TqekHCVUcoARPNW5Mf7QQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 18, 2013 at 8:48 AM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:
> Can you reproduce that one with 7fcbf6a^ (i.e before xlogreader got
> split off?).
>
Yes, it is reproducible before the xlog reader split.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-01-18 00:35:23 | Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave |
Previous Message | Tom Lane | 2013-01-18 00:26:18 | Re: could not create directory "...": File exists |