Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWNYY-0005co-DB for pgsql-hackers@postgresql.org; Thu, 08 Nov 2012 08:33:46 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWNYV-0000lf-7i for pgsql-hackers@postgresql.org; Thu, 08 Nov 2012 08:33:46 +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 D91E4290BD; Thu, 8 Nov 2012 00:33:40 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id D6071B04C2; Thu, 8 Nov 2012 00:33:40 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id F3A3F12199A; Thu, 8 Nov 2012 00:33:57 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zfGv6Hebtbfb; Thu, 8 Nov 2012 00:33:57 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA id F3C5F121991; Thu, 8 Nov 2012 00:33:56 -0800 (PST) Message-ID: <509B6E66.9070408@vmware.com> Date: Thu, 08 Nov 2012 10:33:42 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10 MIME-Version: 1.0 To: Amit kapila CC: Fujii Masao , "pgsql-hackers@postgresql.org" Subject: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown References: <6C0B27F7206C9E4CA54AE035729E9C382853288B@szxeml509-mbs> <5056cb6b.29f2440a.7bd9.1633SMTPIN_ADDED@mx.google.com> <6C0B27F7206C9E4CA54AE035729E9C38285337FF@szxeml509-mbs> <506972B9.6060104@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs> <506AA530.30106@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs> <507597E2.8090701@vmware.com> <5076DD38.8020804@vmware.com> <507BE1AD.2060709@vmware.com> <507e9adc.43db440a.5351.fffff4d0SMTPIN_ADDED@mx.google.com>, <6C0B27F7206C9E4CA54AE035729E9C382853BBED@szxeml509-mbs> In-Reply-To: <6C0B27F7206C9E4CA54AE035729E9C382853BBED@szxeml509-mbs> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.3 (-------) X-Archive-Number: 201211/290 X-Sequence-Number: 216142 On 19.10.2012 14:42, Amit kapila wrote: > On Thursday, October 18, 2012 8:49 PM Fujii Masao wrote: >> Before implementing the timeout parameter, I think that it's better to change >> both pg_basebackup background process and pg_receivexlog so that they >> send back the reply message immediately when they receive the keepalive >> message requesting the reply. Currently, they always ignore such keepalive >> message, so status interval parameter (-s) in them always must be set to >> the value less than replication timeout. We can avoid this troublesome >> parameter setting by introducing the same logic of walreceiver into both >> pg_basebackup background process and pg_receivexlog. > > Please find the patch attached to address the modification mentioned by you (send immediate reply for keepalive). > Both basebackup and pg_receivexlog uses the same function ReceiveXLogStream, so single change for both will address the issue. Thanks, committed this one after shuffling it around the changes I committed yesterday. I also updated the docs to not claim that -s option is required to avoid timeout disconnects anymore. - Heikki