Re: Application name for pg_basebackup and friends - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Application name for pg_basebackup and friends
Date
Msg-id 49f629b0-9862-1d70-f38f-2ee2c1da38c8@iki.fi
Whole thread Raw
In response to Application name for pg_basebackup and friends  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: Application name for pg_basebackup and friends
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Application name for pg_basebackup and friends
Next
From: Julien Rouhaud
Date:
Subject: Re: Collation versioning