Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWNtA-000147-On for pgsql-hackers@postgresql.org; Thu, 08 Nov 2012 08:55:04 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWNt7-00087I-Kr for pgsql-hackers@postgresql.org; Thu, 08 Nov 2012 08:55:03 +0000 Received: from 172.24.2.119 (EHLO szxeml211-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id ARZ44650; Thu, 08 Nov 2012 16:54:39 +0800 (CST) Received: from SZXEML421-HUB.china.huawei.com (10.82.67.160) by szxeml211-edg.china.huawei.com (172.24.2.182) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 8 Nov 2012 16:54:02 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml421-hub.china.huawei.com (10.82.67.160) with Microsoft SMTP Server id 14.1.323.3; Thu, 8 Nov 2012 16:53:55 +0800 From: Amit Kapila To: "'Heikki Linnakangas'" CC: "'Fujii Masao'" , 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> <509B6E66.9070408@vmware.com> In-Reply-To: <509B6E66.9070408@vmware.com> Subject: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown Date: Thu, 8 Nov 2012 14:23:53 +0530 Message-ID: <005701cdbd8e$9571c7c0$c0555740$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac29i8NmgykMYDDQRqC4apEOWd+7cAAAeqjA Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.6 (---) X-Archive-Number: 201211/292 X-Sequence-Number: 216144 On Thursday, November 08, 2012 2:04 PM Heikki Linnakangas wrote: > 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. Thank you. However I think still the issue will not be completely solved. pg_basebackup/pg_receivexlog can still take long time to detect network break as they don't have timeout concept. To do that I have sent one proposal which is mentioned at end of mail chain: http://archives.postgresql.org/message-id/6C0B27F7206C9E4CA54AE035729E9C3828 53BBED@szxeml509-mbs Do you think there is any need to introduce such mechanism in pg_basebackup/pg_receivexlog? With Regards, Amit Kapila.