Re: Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Fujii Masao <masao.fujii@gmail.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2013-01-18T14:20:35Z
Lists: pgsql-hackers
Andres Freund escribió:
> On 2013-01-18 08:24:31 +0900, Michael Paquier wrote:
>
> > 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)
> {
Pushed.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Use the right timeline when beginning to stream from master.
- 2ff65553131d 9.3.0 cited
-
Split out XLog reading as an independent facility
- 7fcbf6a405ff 9.3.0 cited