pgpool2.git / summary / log / commit / refs

commit    feef87e3a85ac9175ff05cb4df4e32c57c84760b
Author:   Taiki Koshino <koshino@sraoss.co.jp>
Date:     Wed Sep 17 07:15:11 2025 +0000

    Update doc about "Setting up PostgreSQL standby" in "8.2. Pgpool-II + Watchdog Setup Example".
    
    Add a note that when setting up a standby without online recovery, do not write primary_conninfo to postgresql.auto.conf.
    
    Discussion: https://github.com/pgpool/pgpool2/issues/67
    Backpatch-through: v4.2


doc.ja/src/sgml/example-cluster.sgml | 26 ++++++++++++++++++++++++-- doc/src/sgml/example-cluster.sgml | 33 +++++++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/doc.ja/src/sgml/example-cluster.sgml b/doc.ja/src/sgml/example-cluster.sgml index f5c01ac4f..9cbfb3ce5 100644 --- a/doc.ja/src/sgml/example-cluster.sgml +++ b/doc.ja/src/sgml/example-cluster.sgml @@ -402,16 +402,38 @@ wal_log_hints = on <itemizedlist> <listitem> <para> - スタンバイで<command>pg_basebackup</command>を実行して、プライマリのデータディレクトリのバックアップを生成します。(この方法を利用する場合は、手動でレプリケーションスロットを作成してください。) + <productname>Pgpool-II</productname>のオンラインリカバリ機能(<xref linkend="runtime-online-recovery">)を使用して、スタンバイサーバを自動的にセットアップします。 </para> </listitem> <listitem> <para> - <productname>Pgpool-II</productname>のオンラインリカバリ機能(<xref linkend="runtime-online-recovery">)を使用して、スタンバイサーバを自動的にセットアップします。 + スタンバイで<command>pg_basebackup</command>を実行して、プライマリのデータディレクトリのバックアップを生成します。 </para> </listitem> </itemizedlist> </para> + <note> + <para> + オンラインリカバリを使用せず手動でスタンバイをセットアップする場合は次の注意点があります。 + <itemizedlist> + <listitem> + <para> + 手動でレプリケーションスロットを作成する必要があります。 + </para> + </listitem> + </itemizedlist> + <itemizedlist> + <listitem> + <para> + pg_basebackup を実行する際には -R オプションを指定しないでください。<varname>primary_conninfo</varname>、 <varname>recovery_target_timeline</varname>、 <varname>primary_slot_name</varname> は <filename>postgresql.auto.conf</filename> ではなく、<filename>$PGDATA/myrecovery.conf</filename> に記載し、<filename>postgresql.conf</filename> に以下を追記してください。 + </para> + </listitem> + </itemizedlist> + <programlisting> +include_if_exists = 'myrecovery.conf' + </programlisting> + </para> + </note> <para> この設定例では、<productname>Pgpool-II</productname>の構成が完了した後に、<xref linkend="example-cluster-verify-standby">で<productname>Pgpool-II</productname>のオンラインリカバリを使用してスタンバイサーバをセットアップします。 </para> diff --git a/doc/src/sgml/example-cluster.sgml b/doc/src/sgml/example-cluster.sgml index 2811af8ed..580626901 100644 --- a/doc/src/sgml/example-cluster.sgml +++ b/doc/src/sgml/example-cluster.sgml @@ -417,18 +417,43 @@ wal_log_hints = on <itemizedlist> <listitem> <para> - use <command>pg_basebackup</command> to backup the data directory of the primary from the standby. + use <productname>Pgpool-II</productname>'s online recovery feature + (<xref linkend="runtime-online-recovery">) to automatically + setup a standby server. </para> </listitem> <listitem> <para> - use <productname>Pgpool-II</productname>'s online recovery feature - (<xref linkend="runtime-online-recovery">) to automatically - setup a standby server. + use <command>pg_basebackup</command> to backup the data directory of the primary from the standby. </para> </listitem> </itemizedlist> </para> + + <note> + <para> + If you manually set up standby without using online recovery, please note the following: + <itemizedlist> + <listitem> + <para> + You must manually create the replication slots. + </para> + </listitem> + </itemizedlist> + <itemizedlist> + <listitem> + <para> + Do not specify the -R option when running pg_basebackup. + Write <varname>primary_conninfo</varname>, <varname>recovery_target_timeline</varname>, and <varname>primary_slot_name</varname> in <filename>$PGDATA/myrecovery.conf</filename>, not in <filename>postgresql.auto.conf</filename>, and add the following to <filename>postgresql.conf</filename>. + </para> + </listitem> + </itemizedlist> + <programlisting> +include_if_exists = 'myrecovery.conf' + </programlisting> + </para> + </note> + <para> In this example, we use <productname>Pgpool-II</productname>'s online recovery to setup the standby server [parent: 58446a66f8d7]