Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)
Date: 2021-09-01 05:13:13
Message-ID: 8f985ba0-2e79-ab67-4fa4-d35024188047@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/08/31 16:11, kuroda(dot)hayato(at)fujitsu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-09-01 05:31:07 Re: Multi-Column List Partitioning
Previous Message Bharath Rupireddy 2021-09-01 05:00:05 Re: pg_receivewal starting position