From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: hot_standby_feedback doesn't work on busy servers in 9.3+
Date: Thu, 16 Jan 2014 23:14:17 +0200
Message-ID: <52D84BA9.1070902@vmware.com> (raw)
In-Reply-To: <CAA4eK1LtJa1KYk1kVq8uFyoLbZuVVL5E2ttox1kAEgBHYiG3vQ@mail.gmail.com>
References: <20140115130150.GB8653@awork2.anarazel.de>
<CAA4eK1K-pXw7jEFQ8dzMpX9_fUjhKn2rOvjfiL1rD94km63v0g@mail.gmail.com>
<20140116084427.GG8653@awork2.anarazel.de>
<CAA4eK1LtJa1KYk1kVq8uFyoLbZuVVL5E2ttox1kAEgBHYiG3vQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 01/16/2014 12:34 PM, Amit Kapila wrote:
> On Thu, Jan 16, 2014 at 2:14 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> On 2014-01-16 10:26:51 +0530, Amit Kapila wrote:
>>
>>>> To a good part that seems to have been introduced in
>>>> 6f60fdd7015b032bf49273c99f80913d57eac284.
>>>
>>> I don't see that above commit has introduced this behaviour, as
>>> the code in question seems to be there without commit as well,
>>> means that HS feedback is only sent when we don't receive data in WAL
>>> receiver.
>>
>> Part of that commit is the following hunk:
>>
>> @@ -609,19 +665,25 @@ XLogWalRcvFlush(bool dying)
>>
>> /* Also let the master know that we made some progress */
>> if (!dying)
>> - {
>> - XLogWalRcvSendReply();
>> - XLogWalRcvSendHSFeedback();
>> - }
>> + XLogWalRcvSendReply(false, false);
>> }
>> }
>>
>> Before that commit XLogWalRcvFlush, which is in the "busy" path, sent
>> hot standby feedback. After that only the idle path does so.
>
> Okay, Thanks for pointing out.
> This is clearly a problem and I think that part of patch should be reverted.
> I have figured out how this has happened, actually during the patch
> (Improve replication connection timeouts) development, there was an idea
> to merge Reply and Feedback messages during which this call got removed
> but later on that doesn't appear to be good way of proceeding, so we decide
> not merge the messages. While kicking out merge of messages part, it seems
> to me that we forgot to add this back.
>
> Heikki, do you remember any other reason for this problem?
> I had referred below thread and the mails following it to find this out:
> http://www.postgresql.org/message-id/6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs
>
> Attached patch should fix this problem.
Yeah, that's probably what happened. Applied, thanks!
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnakangas@vmware.com, amit.kapila16@gmail.com, andres@2ndquadrant.com
Subject: Re: hot_standby_feedback doesn't work on busy servers in 9.3+
In-Reply-To: <52D84BA9.1070902@vmware.com>
References: <20140115130150.GB8653@awork2.anarazel.de> <CAA4eK1K-pXw7jEFQ8dzMpX9_fUjhKn2rOvjfiL1rD94km63v0g@mail.gmail.com> <20140116084427.GG8653@awork2.anarazel.de> <CAA4eK1LtJa1KYk1kVq8uFyoLbZuVVL5E2ttox1kAEgBHYiG3vQ@mail.gmail.com> <52D84BA9.1070902@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox