Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwBxM-000590-G8 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 13:26:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TwBxL-0005iJ-Fc for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 13:26:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwBxJ-0005h8-JT for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 13:26:01 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwBxG-0001a6-Ak for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 13:26:01 +0000 Received: from 172.24.2.119 (EHLO szxeml206-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id AWD12122; Fri, 18 Jan 2013 21:25:31 +0800 (CST) Received: from SZXEML406-HUB.china.huawei.com (10.82.67.93) by szxeml206-edg.china.huawei.com (172.24.2.59) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 18 Jan 2013 21:24:58 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml406-hub.china.huawei.com (10.82.67.93) with Microsoft SMTP Server id 14.1.323.3; Fri, 18 Jan 2013 21:24:57 +0800 From: Amit Kapila To: "'Heikki Linnakangas'" CC: "'Boszormenyi Zoltan'" , "'Hari Babu'" , "'Fujii Masao'" , , "'Magnus Hagander'" References: <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> <50F6819A.8020000@vmwar e.com> <03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com> <50F920D9.1040804@vmware.co m> <03e201cdf570$c67c9c90$5375d5b0$@kapila@huawei.com> <50F93A71.8010307@vmware.com> In-Reply-To: <50F93A71.8010307@vmware.com> Subject: Re: Passing connection string to pg_basebackup Date: Fri, 18 Jan 2013 18:54:54 +0530 Message-ID: <03f401cdf57f$34fc63e0$9ef52ba0$@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: Ac31dbYtWka00ZB8QDmSTmYte3g/2AACTxhA Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.2 (---) 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 Friday, January 18, 2013 5:35 PM Heikki Linnakangas wrote: > On 18.01.2013 13:41, Amit Kapila wrote: > > On Friday, January 18, 2013 3:46 PM Heikki Linnakangas wrote: > >> On 18.01.2013 08:50, Amit Kapila wrote: > >>> I think currently user has no way to specify TCP keepalive settings > >> from > >>> pg_basebackup, please let me know if there is any such existing > way? > >> > >> I was going to say you can just use "keepalives_idle=30" in the > >> connection string. But there's no way to pass a connection string to > >> pg_basebackup on the command line! The usual way to pass a > connection > >> string is to pass it as the database name, and PQconnect will expand > >> it, > >> but that doesn't work with pg_basebackup because it hardcodes the > >> database name as "replication". D'oh. > >> > >> You could still use environment variables and a service file to do > it, > >> but it's certainly more cumbersome. It clearly should be possible to > >> pass a full connection string to pg_basebackup, that's an obvious > >> oversight. > > > > So to solve this problem below can be done: > > 1. Support connection string in pg_basebackup and mention keepalives > or > > connection_timeout > > 2. Support recv_timeout separately to provide a way to users who are > not > > comfortable tcp keepalives > > > > a. 1 can be done alone > > b. 2 can be done alone > > c. both 1 and 2. > > Right. Let's do just 1 for now. I shall fix it as Review comment and update the patch and change the location from CF-3 to current CF. > An general application level, non-TCP, > keepalive message at the libpq level might be a good idea, but that's a > much larger patch, definitely not 9.3 material. With Regards, Amit Kapila. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers