Allow not to use pool_passwd in raw mode.
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 10 Jul 2018 02:25:00 +0000 (11:25 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 10 Jul 2018 02:25:00 +0000 (11:25 +0900)
Since in raw there's only 1 backend is actually involved, there's no
need to use pool_passwd with md5 authentication.
Per bug 411.

doc.ja/src/sgml/client-auth.sgml
doc/src/sgml/client-auth.sgml
src/auth/pool_auth.c

index 35ad69f1b62d3fd63e8a40dfc54c61aac5602c86..686c4e6eaaa8fe644dae73f94a3b89252ab3e513 100644 (file)
@@ -694,6 +694,17 @@ host    postgres        all             192.168.12.10/32        md5
 そのため、<productname>Pgpool-II</productname>の<literal>md5</literal>認証は<xref linkend="guc-pool-passwd">認証ファイルを使ってサポートしています。
    </para>
 
+      <note>
+       <para>
+<!--
+         If <productname>Pgpool-II</productname> is operated in raw
+         mode or there's only 1 backend configured, you don't need to
+         setup <literal>pool_passwd</literal>.
+-->
+<productname>Pgpool-II</productname>をrawモードで使用している場合、あるいはバックエンドが1つしかない場合は、<literal>pool_passwd</literal>を設定する必要はありません。
+       </para>
+      </note>
+
     <sect3 id="md5-authentication-file-format">
 <!--
     <title>Authentication file format</title>
index 53243293895f129932631ae2dc577da9b26989b3..fc9bb5c78a186bb8f46014ed0d46bf63ad734e4d 100644 (file)
        <xref linkend="guc-pool-passwd"> authentication file.
       </para>
 
+      <note>
+       <para>
+         If <productname>Pgpool-II</productname> is operated in raw
+         mode or there's only 1 backend configured, you don't need to
+         setup <literal>pool_passwd</literal>.
+       </para>
+      </note>
+
       <sect3 id="md5-authentication-file-format">
        <title>Authentication file format</title>
 
index 5b2b9a5c5aa80449ae5c80db725ba3ce5489ccc1..b8597815b6afb2e4295849a79e0e01a52a07e1bb 100644 (file)
@@ -819,7 +819,7 @@ static int do_md5(POOL_CONNECTION *backend, POOL_CONNECTION *frontend, int reaut
        char encbuf[POOL_PASSWD_LEN+1];
        char *pool_passwd = NULL;
 
-       if (NUM_BACKENDS > 1)
+       if (!RAW_MODE && NUM_BACKENDS > 1)
        {
                /* Read password entry from pool_passwd */
                pool_passwd = pool_get_passwd(frontend->username);