この場合は、稼働中かつDBノードIDがもっとも若いものが新しいメインノードになります。
</para>
+ <para>
+ レプリケーション構成において、スタンバイ側が参照する<literal>primary_conninfo</literal>の<literal>host</literal>と、<productname>Pgpool-II</productname>がプライマリノードを識別する<varname>backend_hostname</varname>は同じ値を指定する必要があります。
+ たとえば、プライマリノードがbackend0(ホスト名<literal>host0</literal>)、スタンバイノードがbackend1で<varname>backend_application_name</varname>が<literal>server1</literal>の場合、backend1の<filename>postgresql.conf</filename>は次のように設定します。
+ <programlisting>
+primary_conninfo = 'host=host0 port=5432 user=postgres application_name=''server1'''
+ </programlisting>
+ この場合、backend0に対応する<varname>backend_hostname</varname>も<literal>host0</literal>に設定してください。
+ 一致していない場合<productname>Pgpool-II</productname>がプライマリノードを識別できずストリーミングレプリケーションチェックなどがうまく動作しないことがあります。
+ </para>
+
<para>
<!--
Please note that the DB node which has id 0 has no special
for more details.
</para>
+ <para>
+ In a replication configuration, the <literal>host</literal> specified in
+ <literal>primary_conninfo</literal> on the standby side must match the value of
+ <varname>backend_hostname</varname> that <productname>Pgpool-II</productname> uses
+ to identify the primary node.
+ For example, if the primary node is backend0 (with hostname <literal>host0</literal>)
+ and the standby node is backend1 with <varname>backend_application_name</varname>
+ set to <literal>server1</literal>, then the <filename>postgresql.conf</filename>
+ on backend1 should be configured as follows:
+ <programlisting>
+primary_conninfo = 'host=host0 port=5432 user=postgres application_name=''server1'''
+ </programlisting>
+ In this case, <varname>backend_hostname</varname> corresponding to backend0
+ should also be set to <literal>host0</literal>.
+ If these values do not match, <productname>Pgpool-II</productname> may fail to
+ identify the primary node correctly, and features such as streaming replication
+ checks may not work as expected.
+ </para>
+
<para>
If you plan to use only
one <productname>PostgreSQL</productname> server, specify
{
/* the standby does not connect to the primary */
ereport(LOG,
- (errmsg("verify_backend_node_status: primary %d does not connect to standby %d", i, j)));
+ (errmsg("verify_backend_node_status: primary %d does not connect to standby %d", i, j),
+ errdetail("pgpool.conf backend: (host=\"%s\" port=%d) does not match PostgreSQL primary_conninfo: (host=\"%s\" port=%s)",
+ backend_info->backend_hostname, backend_info->backend_port, host, port)));
}
}
}