Re: Allow cluster_name in log_line_prefix

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Allow cluster_name in log_line_prefix
Дата
Msg-id 20191031163615.m25wqh7yyl6ndw7i@alap3.anarazel.de
обсуждение исходный текст
Ответ на Allow cluster_name in log_line_prefix  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2019-10-28 12:33:00 +0800, Craig Ringer wrote:
> I was recently surprised to notice that log_line_prefix doesn't support a
> cluster_name placeholder. I suggest adding one. If I don't hear objections
> I'll send a patch.
> 
> Before anyone asks "but why?!":
> 
> * A constant (short) string in log_line_prefix is immensely useful when
> working with logs from multi-node systems. Whether that's physical
> streaming replication, logical replication, Citus, whatever, it doesn't
> matter. It's worth paying the small storage price for sanity when looking
> at logs.
> 
> * Yes you can embed it directly into log_line_prefix. But then it gets
> copied by pg_basebackup or whatever you're using to clone standbys etc, so
> you can easily land up with multiple instances reporting the same name.
> This rather defeats the purpose.

+1. For a while this was part of the patch that added cluster_name
(possibly worthwhile digging it up from that thread), but some people
thought it was unnecessary, so it was excised from the patch to get the
basic feature...

Greetings,

Andres Freund



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

Предыдущее
От: Jim Finnerty
Дата:
Сообщение: Re: function calls optimization
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Adding percentile metrics to pg_stat_statements module