Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxabZ-0004DG-78 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 09:57:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TxabX-0002Vk-RC for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 09:57:19 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxabW-0002Ve-By for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 09:57:18 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxabT-0004eq-4E for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 09:57:17 +0000 Received: from 172.24.2.119 (EHLO szxeml210-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id AWM05879; Tue, 22 Jan 2013 17:57:03 +0800 (CST) Received: from SZXEML417-HUB.china.huawei.com (10.82.67.156) by szxeml210-edg.china.huawei.com (172.24.2.183) with Microsoft SMTP Server (TLS) id 14.1.323.7; Tue, 22 Jan 2013 17:57:01 +0800 Received: from blrprnc07ns (10.18.96.96) by szxeml417-hub.china.huawei.com (10.82.67.156) with Microsoft SMTP Server id 14.1.323.7; Tue, 22 Jan 2013 17:56:51 +0800 From: Hari Babu To: "'Magnus Hagander'" , "'Heikki Linnakangas'" CC: "'Amit Kapila'" , "'Boszormenyi Zoltan'" , "'Fujii Masao'" , "'PostgreSQL-development'" 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> <50EADA46.60802@cybertec.at> <50F93A71.8010307@vmware.com> In-Reply-To: Subject: Re: Passing connection string to pg_basebackup Date: Tue, 22 Jan 2013 15:26:44 +0530 Message-ID: <000301cdf886$ca337b10$5e9a7130$@kommi@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: Ac32P0QhJxq74GyiTtKDbK2hdP+mngCQ58hg Content-Language: en-us X-Originating-IP: [10.18.96.96] 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 Saturday, January 19, 2013 5:49 PM Magnus Hagander wrote: >On Fri, Jan 18, 2013 at 1:05 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: >>> 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. > >+1 for doing 1 now. But actually, I think we can just keep it that way >in the future as well. If you need to specify these fairly advanced >options, using a connection string really isn't a problem. > >I think it would be more worthwhile to go through the rest of the >tools in bin/ and make sure they *all* support connection strings. >And, an important point, do it the same way. Presently I am trying to implement the option-1 by adding an extra command line Option -C "connection_string" to pg_basebackup and pg_receivexlog. This option can be used with all the tools in bin folder. The existing command line options to the tools are not planned to remove as of now. To handle both options, we can follow these approaches. 1. To make the code simpler, the connection string is formed inside with the existing command line options, if the user is not provided the "connection_string" option. which is used for further processing. 2. The connection_string and existing command line options are handled separately. I feel approach-1 is better. Please provide your suggestions on the same. Regards, Hari babu. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers