From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: kuroda.hayato@fujitsu.com <kuroda.hayato@fujitsu.com>
Cc: 'pgsql-hackers@lists.postgresql.org' <pgsql-hackers@lists.postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)
Date: Wed, 1 Sep 2021 14:13:13 +0900
Message-ID: <8f985ba0-2e79-ab67-4fa4-d35024188047@oss.nttdata.com> (raw)
In-Reply-To: <TYAPR01MB5866EF9624D2DFA8A74E5E94F5CC9@TYAPR01MB5866.jpnprd01.prod.outlook.com>
References: <TYCPR01MB5870D1E8B949DAF6D3B84E02F5F29@TYCPR01MB5870.jpnprd01.prod.outlook.com>
<ed1c8ef2-16ac-4e56-d302-b1ff430baeec@oss.nttdata.com>
<TYAPR01MB58661635D3884E3B863ED01CF5C79@TYAPR01MB5866.jpnprd01.prod.outlook.com>
<TYAPR01MB5866EF9624D2DFA8A74E5E94F5CC9@TYAPR01MB5866.jpnprd01.prod.outlook.com>
On 2021/08/31 16:11, kuroda.hayato@fujitsu.com wrote:
> Dear Fujii-san,
>
> I attached new version, that almost all codes
> moved from libpq to postgres_fdw.
Thanks for updating the patch!
Can we split the patch into two as follows? If so, we can review
and commit them one by one.
#1. Add application_name GUC into postgres_fdw
#2. Allow to specify special escape characters in application_name that postgres_fdw uses.
>
> Now we can accept four types of escapes.
> All escapes will be rewritten to connection souce's information:
>
> * application_name,
> * user name,
> * database name, and
> * backend's pid.
+1
>
> These are cannot be set by log_line_prefix, so I think it is useful.
>
>
> We can use escape sequences in two ways:
> * Sets postgres_fdw.application_name GUC paramter, or
> * Sets application_name option in CREATE SERVER command.
OK.
>
> Which version do you like?
For now I've not found real use case that implementing the feature
in libpq would introduce. So IMO postgres_fdw version is better.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: masao.fujii@oss.nttdata.com, kuroda.hayato@fujitsu.com, pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us
Subject: Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)
In-Reply-To: <8f985ba0-2e79-ab67-4fa4-d35024188047@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox