From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Hari Babu <haribabu(dot)kommi(at)huawei(dot)com>, 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-19 12:19:28 |
Message-ID: | CABUevEy58tOdP-NMwXtJvsOezBUe9DGBwsPCFC7UN9CLKSCWMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
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:
>>>>
>>>> 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.
+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.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2013-01-19 12:20:23 | Re: Passing connection string to pg_basebackup |
Previous Message | Tsunezumi | 2013-01-19 08:46:48 | Re: BUG #7814: Rotation of the log is not carried out. |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2013-01-19 12:20:23 | Re: Passing connection string to pg_basebackup |
Previous Message | Simon Riggs | 2013-01-19 10:21:27 | Re: foreign key locks |