Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMFrV-000648-CZ; Thu, 11 Oct 2012 10:19:29 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMFrQ-0005Of-NY; Thu, 11 Oct 2012 10:19:28 +0000 Received: from 172.24.2.119 (EHLO szxeml210-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id AQK29842; Thu, 11 Oct 2012 18:19:03 +0800 (CST) Received: from SZXEML414-HUB.china.huawei.com (10.82.67.153) by szxeml210-edg.china.huawei.com (172.24.2.183) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 11 Oct 2012 18:17:16 +0800 Received: from blrprnc09ns (10.18.96.98) by SZXEML414-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.1.323.3; Thu, 11 Oct 2012 18:17:13 +0800 From: Amit Kapila To: "'Heikki Linnakangas'" CC: "'Fujii Masao'" , , References: <50515fcd.c32f320a.4297.ffffb186SMTPIN_ADDED@mx.google.com> <6C0B27F7206C9E4CA54AE035729E9C382853264E@szxeml509-mbs> <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> In-Reply-To: <507597E2.8090701@vmware.com> Subject: Re: BUG #7534: walreceiver takes long time to detect n/w breakdown Date: Thu, 11 Oct 2012 15:47:11 +0530 Message-ID: <001601cda799$94dbf390$be93dab0$@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: Ac2m/ixfpr04Q2HVSYWsDnOk3/COsAAmauDA Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.0 (---) X-Archive-Number: 201210/84 X-Sequence-Number: 34384 On Wednesday, October 10, 2012 9:15 PM Heikki Linnakangas wrote: > On 04.10.2012 13:12, Amit kapila wrote: > > Following changes are done to support replication timeout in sender as > well as receiver: > > > > 1. One new configuration parameter wal_receiver_timeout is added to > detect timeout at receiver task. > > 2. Existing parameter replication_timeout is renamed to > wal_sender_timeout. > > Ok. The other option would be to have just one GUC, I'm open to > bikeshedding on this one. On one hand, there's no reason the timeouts > have to the same, so it would be nice to have separate settings, but on > the other hand, I can't imagine a case where a single setting wouldn't > work just as well. I think for below case, they are required to be separate: 1. M1 (Master), S1 (Standby 1), S2 (Standby 2) 2. S1 is standby for M1, and S2 is standby for S1. Basically a simple case of cascaded replication 3. M1 and S1 are on local network but S2 is placed at geographically different location. (what I want to say is n/w between M1-S1 is of good speed and S1-S2 is very slow) 4. In above case, user might want to configure different timeouts for sender and receiver on S1. > Attached is an updated patch. I reverted the merging of message types > and fixed a bunch of cosmetic issues. There was one bug: in the main > loop of walreceiver, you send the "ping" message on every wakeup after > enough time has passed since last reception. That means that if the > server doesn't reply promptly, you send a new ping message every 100 ms > (NAPTIME_PER_CYCLE), until it gets a reply. Walsender had the same > issue, but it was not quite as sever there because the naptime was > longer. Fixed that. Thanks. > > How does this look now? The Patch is fine and test results are also fine. With Regards, Amit Kapila.