Thread: Application name for pg_basebackup and friends

Application name for pg_basebackup and friends

From
Jesper Pedersen
Date:
Hi,

The attached patch adds an -a / --appname command line switch to
pg_basebackup, pg_receivewal and pg_recvlogical.

This is useful when f.ex. pg_receivewal needs to connect as a
synchronous client (synchronous_standby_names),

  pg_receivewal -h myhost -p 5432 -S replica1 -a replica1 --synchronous
-D /wal

I'll add the patch to the CommitFest for discussion, as there is overlap
with the -d switch.

Best regards,
  Jesper

Attachment

Re: Application name for pg_basebackup and friends

From
Heikki Linnakangas
Date:
On 31/10/2019 14:52, Jesper Pedersen wrote:
> Hi,
> 
> The attached patch adds an -a / --appname command line switch to
> pg_basebackup, pg_receivewal and pg_recvlogical.
> 
> This is useful when f.ex. pg_receivewal needs to connect as a
> synchronous client (synchronous_standby_names),
> 
>    pg_receivewal -h myhost -p 5432 -S replica1 -a replica1 --synchronous
> -D /wal
> 
> I'll add the patch to the CommitFest for discussion, as there is overlap
> with the -d switch.

You can already set application name with the environment variable or on 
the database connections string:

pg_receivewal -D /wal -d "host=myhost application_name=myreceiver"

I don't think we need a new comand line switch for it.

- Heikki



Re: Application name for pg_basebackup and friends

From
Michael Paquier
Date:
On Thu, Oct 31, 2019 at 03:10:35PM +0200, Heikki Linnakangas wrote:
> You can already set application name with the environment variable or on the
> database connections string:
>
> pg_receivewal -D /wal -d "host=myhost application_name=myreceiver"
>
> I don't think we need a new comand line switch for it.

+1.
--
Michael

Attachment

Re: Application name for pg_basebackup and friends

From
Michael Paquier
Date:
On Sat, Nov 02, 2019 at 04:45:40PM +0900, Michael Paquier wrote:
> On Thu, Oct 31, 2019 at 03:10:35PM +0200, Heikki Linnakangas wrote:
>> You can already set application name with the environment variable or on the
>> database connections string:
>>
>> pg_receivewal -D /wal -d "host=myhost application_name=myreceiver"
>>
>> I don't think we need a new comand line switch for it.
>
> +1.

Please note that I have marked this patch as rejected in the CF app,
per the arguments upthread.
--
Michael

Attachment

Re: Application name for pg_basebackup and friends

From
Jesper Pedersen
Date:
On 11/7/19 1:51 AM, Michael Paquier wrote:
>>> I don't think we need a new comand line switch for it.
>>
>> +1.
>
> Please note that I have marked this patch as rejected in the CF app,
> per the arguments upthread.

Ok, agreed.

Thanks for the feedback !

Best regards,
  Jesper