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

From: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, 'Fujii Masao' <masao(dot)fujii(at)oss(dot)nttdata(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-08-31 07:11:33
Message-ID: TYAPR01MB5866EF9624D2DFA8A74E5E94F5CC9@TYAPR01MB5866.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Fujii-san,

I attached new version, that almost all codes
moved from libpq to postgres_fdw.

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.

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.

Which version do you like?

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v04_0002_add_guc.patch application/octet-stream 8.7 KB
v04_0001_move_process_padding.patch application/octet-stream 4.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-08-31 07:35:36 Re: Possible missing segments in archiving on standby
Previous Message Yugo NAGATA 2021-08-31 07:03:05 Re: Fix around conn_duration in pgbench