Re: Cluster name in ps output
От | Thomas Munro |
---|---|
Тема | Re: Cluster name in ps output |
Дата | |
Msg-id | CADLWmXW5K2zuidMfEuXfcPvkzS8cD=sP8_1sRJAZT+JiHsdsew@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Cluster name in ps output (Andres Freund <andres@2ndquadrant.com>) |
Ответы |
Re: Cluster name in ps output
|
Список | pgsql-hackers |
On 5 May 2014 17:22, Andres Freund <andres@2ndquadrant.com> wrote:
I verified that SHOW cluster_name works as expected and you can't
Thanks,
Well, it's a included file. With log_line_prefix support justOn 2014-05-05 13:07:48 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2014-05-05 10:07:46 -0400, Tom Lane wrote:
> >> Also, -1 for adding another log_line_prefix escape. If you're routing
> >> multiple clusters logging to the same place (which is already a bit
> >> unlikely IMO), you can put distinguishing strings in log_line_prefix
> >> already. And it's not like we've got an infinite supply of letters
> >> for those escapes.
>
> > Using syslog and including the same config file from multiple clusters
> > isn't that uncommon. But I can live without it.
>
> So, if you are sharing a config file, how is it that you can set a
> per-cluster cluster_name but not a per-cluster log_line_prefix?
cluster_name has to be set per cluster. Without you need string
interpolation in the config management to include cluster_name in
log_line_prefix.
Attached as cluster-name-in-ps-v3-a.patch is a new version with
the following changes:
* the brackets removed, as suggested by Tom Lane
* static initialization of cluster_name to avoid any possibility
of an uninitialized/null pointer being used before GUC
initialization, as suggested by Andres Freund
* cluster_name moved to config group CONN_AUTH_SETTINGS, on the
basis that it's similar to bonjour_name, but it isn't
really... open to suggestions for a better config_group!
* a small amount of documentation in config.sgml (with
cluster_name under Connection Settings, which probably
isn't right either)
cluster_name under Connection Settings, which probably
isn't right either)
* sample conf file updated to show cluster_name and %C in
log_line_prefix
A shorter version without the log_line_prefix support that Tom didn't
like is attached as cluster-name-in-ps-v3-b.patch. I will try to add these
to the open commitfest, and see if there is something I can usefully
review in return.
like is attached as cluster-name-in-ps-v3-b.patch. I will try to add these
to the open commitfest, and see if there is something I can usefully
review in return.
I verified that SHOW cluster_name works as expected and you can't
change it with SET.
Thanks,
Thomas Munro
Вложения
В списке pgsql-hackers по дате отправления: