Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvQHe-0008N4-Pl for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Jan 2013 10:31:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TvQHd-0003Md-LG for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Jan 2013 10:31:49 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvQHc-0003MX-D2 for pgsql-hackers@postgresql.org; Wed, 16 Jan 2013 10:31:48 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TvQHa-000285-2k for pgsql-hackers@postgresql.org; Wed, 16 Jan 2013 10:31: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 8497E2847A; Wed, 16 Jan 2013 02:31:44 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 7FD71B0566; Wed, 16 Jan 2013 02:31:44 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 695B0C1572; Wed, 16 Jan 2013 02:31:44 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-2.vmware.com Received: from zcs-prod-ext-mta-2.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-2.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mFZlOKkdNIY7; Wed, 16 Jan 2013 02:31:44 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 32DE5C1533; Wed, 16 Jan 2013 02:31:44 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Wed, 16 Jan 2013 02:31:42 -0800 (PST) Message-ID: <50F6819A.8020000@vmware.com> Date: Wed, 16 Jan 2013 12:31:54 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11 MIME-Version: 1.0 To: Boszormenyi Zoltan CC: Hari Babu , 'Fujii Masao' , pgsql-hackers@postgresql.org, 'Amit kapila' Subject: Re: Review of "pg_basebackup and pg_receivexlog to use non-blocking socket communication", was: Re: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown References: <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> <509c9cd1.494f420a.3fc7.4362SMTPIN_ADDED@mx.google.com>, <6C0B27F7206C9E4CA54AE035729E9C38285499FA@szxeml509-mbx> <50E31370.5030405@cybertec.at> <007701cdea79$0cf35b30$26da1190$@kommi@huawei.co m> <50EADA46.60802@cybertec.at> In-Reply-To: <50EADA46.60802@cybertec.at> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 07.01.2013 16:23, Boszormenyi Zoltan wrote: > Since my other patch against pg_basebackup is now committed, > this patch doesn't apply cleanly, patch rejects 2 hunks. > The fixed up patch is attached. Now that I look at this a high-level perspective, why are we only worried about timeouts in the Copy-mode and when connecting? The initial checkpoint could take a long time too, and if the server turns into a black hole while the checkpoint is running, pg_basebackup will still hang. Then again, a short timeout on that phase would be a bad idea, because the checkpoint can indeed take a long time. In streaming replication, the keep-alive messages carry additional information, the timestamps and WAL locations, so a keepalive makes sense at that level. But otherwise, aren't we just trying to reimplement TCP keepalives? TCP keepalives are not perfect, but if we want to have an application level timeout, it should be implemented in the FE/BE protocol. I don't think we need to do anything specific to pg_basebackup. The user can simply specify TCP keepalive settings in the connection string, like with any libpq program. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers