Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwAsa-0002Rq-Lz for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 12:17:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TwAsZ-0000nz-Ad for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jan 2013 12:17: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 1TwAsY-0000mz-3L for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 12:17:02 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TwAsT-0000Z5-Be for pgsql-hackers@postgresql.org; Fri, 18 Jan 2013 12:17:00 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id DBFFF28249; Fri, 18 Jan 2013 04:16:53 -0800 (PST) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id D5AF71860A; Fri, 18 Jan 2013 04:16:53 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id C4AF5C1548; Fri, 18 Jan 2013 04:16:53 -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 lECNupmVo6Cq; Fri, 18 Jan 2013 04:16:53 -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 D8D2DC1523; Fri, 18 Jan 2013 04:04:55 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Fri, 18 Jan 2013 04:04:54 -0800 (PST) Message-ID: <50F93A71.8010307@vmware.com> Date: Fri, 18 Jan 2013 14:05:05 +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: Amit Kapila CC: 'Boszormenyi Zoltan' , 'Hari Babu' , 'Fujii Masao' , pgsql-hackers@postgresql.org, 'Magnus Hagander' Subject: Re: Passing connection string to pg_basebackup 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> In-Reply-To: <03e201cdf570$c67c9c90$5375d5b0$@kapila@huawei.com> Content-Type: text/plain; charset=ISO-8859-1; 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 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. 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. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers