Set fallback_application_name for a walreceiver to cluster_name

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Set fallback_application_name for a walreceiver to cluster_name
Дата
Msg-id 1257eaee-4874-e791-e83a-46720c72cac7@2ndquadrant.com
обсуждение исходный текст
Ответы Re: Set fallback_application_name for a walreceiver to cluster_name  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-hackers
By default, the fallback_application_name for a physical walreceiver is
"walreceiver".  This means that multiple standbys cannot be
distinguished easily on a primary, for example in pg_stat_activity or
synchronous_standby_names.

I propose, if cluster_name is set, use that for
fallback_application_name in the walreceiver.  (If it's not set, it
remains "walreceiver".)  If someone set cluster_name to identify their
instance, we might as well use that by default to identify the node
remotely as well.  It's still possible to specify another
application_name in primary_conninfo explicitly.

Then you can do something like cluster_name = 'nodeN' and
synchronous_standby_names = 'node1,node2,node3' without any further
fiddling with application_name.

See attached patches.

I also included a patch to set cluster_name in PostgresNode.pm
instances, for easier identification and a bit of minimal testing.
Because of the issues described in [0], this doesn't allow dropping the
explicit application_name assignments in tests yet, but it's part of the
path to get there.

[0]:
<https://www.postgresql.org/message-id/33383613-690e-6f1b-d5ba-4957ff40f6ce@2ndquadrant.com>

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: RE: speeding up planning with partitions
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: ToDo: show size of partitioned table