Re: Support escape sequence for cluster_name in postgres_fdw.application_name

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Support escape sequence for cluster_name in postgres_fdw.application_name
Дата
Msg-id 20220127.171042.1194024926941192601.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Support escape sequence for cluster_name in postgres_fdw.application_name  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Support escape sequence for cluster_name in postgres_fdw.application_name  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Re: Support escape sequence for cluster_name in postgres_fdw.application_name  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
At Tue, 25 Jan 2022 16:02:39 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in 
> Hi,
> 
> Commit 6e0cb3dec1 allowed postgres_fdw.application_name to include
> escape sequences %a (application name), %d (database name), %u (user
> name) and %p (pid). In addition to them, I'd like to support the
> escape sequence (e.g., %C) for cluster name there. This escape
> sequence is helpful to investigate where each remote transactions came
> from. Thought?
> 
> Patch attached.

I don't object to adding more meaningful replacements, but more escape
sequence makes me anxious about the increased easiness of exceeding
the size limit of application_name.  Considering that it is used to
identify fdw-initinator server, we might need to add padding (or
rather truncating) option in the escape sequence syntax, then warn
about truncated application_names for safety.

Is the reason for 'C' in upper-case to avoid possible conflict with
'c' of log_line_prefix?  I'm not sure that preventive measure is worth
doing.  Looking the escape-sequence spec alone, it seems to me rather
strange that an upper-case letter is used in spite of its lower-case
is not used yet.

Otherwise all looks fine to me except the lack of documentation.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dipesh Pandit
Дата:
Сообщение: Re: refactoring basebackup.c
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ICU for global collation