Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uGj-0002Rh-VA for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2014 21:14:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W3uGj-0004qr-Dp for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2014 21:14:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uGh-0004pQ-Sb for pgsql-bugs@postgresql.org; Thu, 16 Jan 2014 21:14:27 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uGd-0005PA-Mx for pgsql-bugs@postgresql.org; Thu, 16 Jan 2014 21:14:27 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 6D8B428747; Thu, 16 Jan 2014 13:14:20 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 6261BB0398; Thu, 16 Jan 2014 13:14:20 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 4604BC005D; Thu, 16 Jan 2014 13:14:56 -0800 (PST) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Thu, 16 Jan 2014 13:14:55 -0800 (PST) Message-ID: <52D84BA9.1070902@vmware.com> Date: Thu, 16 Jan 2014 23:14:17 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: Amit Kapila CC: Andres Freund , PostgreSQL Bugs Subject: Re: hot_standby_feedback doesn't work on busy servers in 9.3+ References: <20140115130150.GB8653@awork2.anarazel.de> <20140116084427.GG8653@awork2.anarazel.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.2 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 01/16/2014 12:34 PM, Amit Kapila wrote: > On Thu, Jan 16, 2014 at 2:14 PM, Andres Freund 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