From b49642453c07d25b80ef39aa88532fc08a8c7676 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 20 Jul 2021 16:01:08 +0900 Subject: [PATCH] Doc: add more explanation about backend_application_name. --- doc.ja/src/sgml/connection-settings.sgml | 13 +++++++++++-- doc/src/sgml/connection-settings.sgml | 18 ++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/doc.ja/src/sgml/connection-settings.sgml b/doc.ja/src/sgml/connection-settings.sgml index 2b353086f..100396dd9 100644 --- a/doc.ja/src/sgml/connection-settings.sgml +++ b/doc.ja/src/sgml/connection-settings.sgml @@ -1703,9 +1703,18 @@ backend_clustering_mode = 'raw' - backend_application_nameはWAL logをプライマリサーバから読み込むwalsenderのために使用するapplication_nameを設定します。 + backend_application_nameはWAL logをプライマリサーバから読み込むwalreceiverのために使用するapplication_nameを設定します。 ですから、ストリーミングレプリケーションモード以外では設定する必要がありません。 - また、このパラメータはコマンド中に表示される"replication_state"と"replication_sync_state"のために使用されます。 + また、このパラメータはとコマンド中に表示される"replication_state"と"replication_sync_state"のために使用されます。 + + + たとえば、プライマリノードがbackend0(そのホスト名は"host0"とします)、スタンバイノードはbackend1で、backend1のbackend_application_nameは"server1"であるとします。 + すると、postgresql.confのprimary_conninfoパラメータは次のようになるはずです。 + +primary_conninfo = 'host=host0 port=5432 user=postgres application_name='server1'' + + がそのパラメータを生成します。 + コマンドの完全な例に関しては、をご覧ください。 このパラメータはPgpool-IIの設定を再読み込みすることで変更可能です。 diff --git a/doc/src/sgml/connection-settings.sgml b/doc/src/sgml/connection-settings.sgml index 86ec32ef0..0670efae4 100644 --- a/doc/src/sgml/connection-settings.sgml +++ b/doc/src/sgml/connection-settings.sgml @@ -1263,12 +1263,26 @@ backend_clustering_mode = 'raw' backend_application_name specifies the - application name of walsender, which receives WAL log + application name of walreceiver, which receives WAL log from primary node. Thus in other than streaming replication mode, this parameter does not need to be set. Also this parameter is required to if you want to show "replication_state" and "replication_sync_state" column - in command. + in and commands. + + + For example, suppose the primary node is backend0 (its host name + is "host0"), the standby node in question is backend1 and the + backend_application_name for backend1 is "server1", then + primary_conninfo parameter of + postgresql.conf should like like: + +primary_conninfo = 'host=host0 port=5432 user=postgres application_name='server1'' + + The should + generate the parameter. See for a + complete example of the command. This parameter can be changed by reloading -- 2.39.5