Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uQK-0002q5-2t for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2014 21:24:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W3uQI-0006iV-UK for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jan 2014 21:24:22 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uQH-0006iO-Sf for pgsql-bugs@postgresql.org; Thu, 16 Jan 2014 21:24:22 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3uQE-0007gH-2r for pgsql-bugs@postgresql.org; Thu, 16 Jan 2014 21:24:20 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 8BC682825E; Thu, 16 Jan 2014 13:24:16 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 68974185A1; Thu, 16 Jan 2014 13:24:16 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 895A9120036; Thu, 16 Jan 2014 13:25:41 -0800 (PST) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Thu, 16 Jan 2014 13:25:40 -0800 (PST) Message-ID: <52D84DFD.3040503@vmware.com> Date: Thu, 16 Jan 2014 23:24:13 +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: Andres Freund CC: Amit Kapila , 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: <20140116084427.GG8653@awork2.anarazel.de> 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 10:44 AM, Andres Freund wrote: > On 2014-01-16 10:26:51 +0530, Amit Kapila wrote: >>> Looking into this I also noticed that the busy path is odd, because a) >>> why are we sending a reply before flushing things to disk? b) >>> XLogWalRcvFlush() will do it's own XLogWalRcvSendReply(). >> >> I think call to reply in XLogWalRcvFlush() might not actually send >> reply because of time difference of last Reply message which we >> sent before flush call. > > Yes, but most of the time that will lead to only outdated data to be > sent since that's the first call. Hardly a severe issue, odd nonetheless. > >> The only point that occurs to me for having such a code is that >> incase flush call fails due to disk space or some other such issue, >> it can atleast send the correct write position to primary. > > Unconvinced. The reply message contains a pointers for how far the WAL has been applied, written, and flushed. There can be a significant delay between the write and flush steps, so we send a separate reply after writing, and after flushing. (if we didn't, the flush and write pointers sent to the master would always be the equal). - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs