Re: Passing connection string to pg_basebackup

From: Hari Babu <haribabu(dot)kommi(at)huawei(dot)com>
To: "'Magnus Hagander'" <magnus(at)hagander(dot)net>, "'Heikki Linnakangas'" <hlinnakangas(at)vmware(dot)com>
Cc: "'Amit Kapila'" <amit(dot)kapila(at)huawei(dot)com>, "'Boszormenyi Zoltan'" <zb(at)cybertec(dot)at>, "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Passing connection string to pg_basebackup
Date: 2013-01-22 09:56:44
Message-ID: 000301cdf886$ca337b10$5e9a7130$@kommi@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Saturday, January 19, 2013 5:49 PM Magnus Hagander wrote:
>On Fri, Jan 18, 2013 at 1:05 PM, Heikki Linnakangas
><hlinnakangas(at)vmware(dot)com> 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tsunezumi 2013-01-22 12:42:32 Re: BUG #7814: Rotation of the log is not carried out.
Previous Message Amit Kapila 2013-01-22 06:31:14 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2013-01-22 11:24:48 Re: pg_dump transaction's read-only mode
Previous Message Dimitri Fontaine 2013-01-22 09:35:51 Re: CF3+4 (was Re: Parallel query execution)