Doc: enhance the explanation on sr_check_user.
authorTatsuo Ishii <ishii@postgresql.org>
Wed, 5 Mar 2025 10:55:11 +0000 (19:55 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Wed, 5 Mar 2025 10:57:27 +0000 (19:57 +0900)
It must be a superuser or in the pg_monitor group.

Backpatch-through: v4.2.

doc.ja/src/sgml/stream-check.sgml
doc/src/sgml/stream-check.sgml

index dcb9846e4f7cacc31c632543390438a3f82818a7..e7c2c4a5e21e3aaa1a1ef0b3100864f3d034801c 100644 (file)
      -->
      ストリーミングレプリケーションのチェックを行う<productname>PostgreSQL</>ユーザ名を指定します。
      このユーザはLOGIN権限を持ち、すべてのバックエンドに存在しなければなりません。
+     更にこのユーザは、<productname>PostgreSQL</productname>のスーパーユーザか、"pg_monitor"グループに所属していなければなりません。
+     <note>
+      <para>
+       <xref linkend="guc-sr-check-user">をpg_monitorグループに所属させるには、以下のSQLコマンドを<productname>PostgreSQL</productname>スーパーユーザーで実行してください("sr_check_user"を<xref linkend="guc-sr-check-user">の設定値で置き換えてください)
+       <programlisting>
+GRANT pg_monitor TO sr_check_user;
+       </programlisting>
+       <productname>PostgreSQL</productname> 9.6にはpg_monitorグループがないので、<xref linkend="guc-sr-check-user">は<productname>PostgreSQL</productname>のスーパーユーザーでなければなりません。
+    </para>
+   </note>
     </para>
     <para>
      <!--
index 25b41235311cdad16f73f9511c8e448397e197ec..8f2251e9d5fb11267699f041da84a0fa5437bcc6 100644 (file)
      Specifies the <productname>PostgreSQL</> user name to perform streaming replication check.
      The user must have LOGIN privilege and exist on all the
      <productname>PostgreSQL</> backends.
+     Moreover the user must be a <productname>PostgreSQL</productname>
+     super user or in "pg_monitor" group.
+   <note>
+    <para>
+     To make <xref linkend="guc-sr-check-user"> in pg_monitor
+     group, execute following SQL command
+     by <productname>PostgreSQL</productname> super user (replace
+     "sr_check_user" with the setting of <xref linkend="guc-sr-check-user">):
+     <programlisting>
+GRANT pg_monitor TO sr_check_user;
+     </programlisting>
+     For <productname>PostgreSQL</productname> 9.6, there's no
+     pg_monitor group and <xref linkend="guc-sr-check-user"> must
+     be <productname>PostgreSQL</productname> super user.
+    </para>
+   </note>
+
     </para>
     <para>
      If <link linkend="runtime-ssl">SSL</link> is enabled, the