Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TDxH0-0003c9-CR; Tue, 18 Sep 2012 12:51:30 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TDxGx-0007Hp-BP; Tue, 18 Sep 2012 12:51:30 +0000 Received: from 172.24.2.119 (EHLO szxeml205-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id APF17888; Tue, 18 Sep 2012 20:51:19 +0800 (CST) Received: from SZXEML403-HUB.china.huawei.com (10.82.67.35) by szxeml205-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.1.323.3; Tue, 18 Sep 2012 20:50:35 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml403-hub.china.huawei.com (10.82.67.35) with Microsoft SMTP Server id 14.1.323.3; Tue, 18 Sep 2012 20:50:34 +0800 From: Amit Kapila To: "'Fujii Masao'" CC: , References: <50515fcd.c32f320a.4297.ffffb186SMTPIN_ADDED@mx.google.com> <6C0B27F7206C9E4CA54AE035729E9C382853264E@szxeml509-mbs> <6C0B27F7206C9E4CA54AE035729E9C382853288B@szxeml509-mbs> <5056cb6b.29f2440a.7bd9.1633SMTPIN_ADDED@mx.google.com> In-Reply-To: Subject: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown Date: Tue, 18 Sep 2012 18:20:33 +0530 Message-ID: <003f01cd959c$317e9af0$947bd0d0$@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: Ac2VmbmZRDshX++LQKCcaJsMgfFw0AAAdDNQ Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -1.4 (-) X-Archive-Number: 201209/672 X-Sequence-Number: 213700 On Tuesday, September 18, 2012 6:03 PM Fujii Masao wrote: On Mon, Sep 17, 2012 at 4:03 PM, Amit Kapila wrote: >> To define the behavior correctly, according to me there are 2 options now: > >> Approach-1 : >> Document that both(sender and receiver) the timeout parameters should be >> greater than wal_receiver_status_interval. >> If both are greater, then I think it might never timeout due to Idle. > In this approach, keepalive messages are sent each wal_receiver_status_interval? wal_receiver_status_interval or sleeptime whichever is smaller. >> Approach-2 : >> Provide a variable wal_send_status_interval, such that if this is 0, then >> the current behavior would prevail and if its non-zero then KeepAlive >> message would be send maximum after that time. >> The modified code of WALSendLoop will be as follows: >> Which way you think is better or you have any other idea to handle. > I think #2 is better because it's more intuitive to a user. I shall update the Patch as per Approach-2 and upload the same. With Regards, Amit Kapila.