summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTaiki Koshino2025-08-19 01:33:14 +0000
committerTaiki Koshino2025-08-19 01:33:14 +0000
commit606ebc91493eb5adb8a525a68d6cc36bea1617dd (patch)
tree83c310056c6c36669f8ad9dceff2b5c5072c81b2 /doc/src
parentdfffcddd6102ae51d9a429f1351b13a43e3218f8 (diff)
Doc: Update "8.3. Replication Mode and Snapshot Isolation Mode Configuration Example" Document.
Updated the link to the example script and the explanation in the "8.3.3. Before you begin" section.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/example-replication-si-mode.sgml67
1 files changed, 44 insertions, 23 deletions
diff --git a/doc/src/sgml/example-replication-si-mode.sgml b/doc/src/sgml/example-replication-si-mode.sgml
index 1100a754e..2ab3aeb40 100644
--- a/doc/src/sgml/example-replication-si-mode.sgml
+++ b/doc/src/sgml/example-replication-si-mode.sgml
@@ -223,16 +223,6 @@ exclude=pgpool*
Before you start the configuration process, please check the following prerequisites.
</para>
- <sect3 id="example-replication-mode-postgres-password">
- <title>Setting password of postgres user</title>
- <para>
- Run the following command to set the password of <literal>postgres</literal> user on each server.
- </para>
- <programlisting>
-[all servers]# passwd postgres
- </programlisting>
- </sect3>
-
<sect3 id="example-replication-mode-ssh">
<title>Configure passwordless SSH login</title>
<para>
@@ -245,17 +235,48 @@ exclude=pgpool*
</para>
<programlisting>
[all servers]# su - postgres
-[all servers]$ cd ~/.ssh
-[all servers]$ ssh-keygen -t rsa -f id_rsa_pgpool
-[all servers]$ ssh-copy-id -i id_rsa_pgpool.pub postgres@server1
-[all servers]$ ssh-copy-id -i id_rsa_pgpool.pub postgres@server2
-[all servers]$ ssh-copy-id -i id_rsa_pgpool.pub postgres@server3
+[all servers]$ mkdir ~/.ssh && chmod 700 ~/.ssh
+[all servers]$ ssh-keygen -t rsa -f ~/.ssh/id_rsa_pgpool
</programlisting>
<para>
- After setting SSH, use <command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command> command to
- make sure that you can log in without entering a password. Edit <filename>/etc/ssh/sshd_config</filename>
- if necessary and restart sshd.
+ Then add the public key <filename>id_rsa_pgpool.pub</filename> to
+ <filename>/var/lib/pgsql/.ssh/authorized_keys</filename> file
+ on each server.
+ </para>
+ <para>
+ After setting SSH, make sure that you can run
+ <command>ssh postgres@serverX -i ~/.ssh/id_rsa_pgpool</command> command
+ as <literal>postgres</literal> user to login to each server
+ without entering a password.
</para>
+
+ <note>
+ <para>
+ If you failed to login using SSH public key authentication, please check the following:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Ensure the public key authentication option <literal>PubkeyAuthentication</literal> are allowed in <filename>/etc/ssh/sshd_config</filename>:
+ </para>
+ </listitem>
+ </itemizedlist>
+ <programlisting>
+PubkeyAuthentication yes
+ </programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If SELinux is enabled, SSH public key authentication (passwordless SSH) may fail.
+ You need to run the following command on all servers.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <programlisting>
+[all servers]# su - postgres
+[all servers]$ restorecon -Rv ~/.ssh
+ </programlisting>
+ </para>
+ </note>
</sect3>
<sect3 id="example-replication-mode-pgpass">
@@ -268,14 +289,14 @@ exclude=pgpool*
</para>
<programlisting>
[all servers]# su - postgres
-[all servers]$ vi /var/lib/pgsql/.pgpass
+[all servers]$ vi ~/.pgpass
server1:5432:replication:repl:&lt;repl user password&gt;
server2:5432:replication:repl:&lt;repl user password&gt;
server3:5432:replication:repl:&lt;repl user password&gt;
server1:5432:postgres:postgres:&lt;postgres user password&gt;
server2:5432:postgres:postgres:&lt;postgres user password&gt;
server3:5432:postgres:postgres:&lt;postgres user password&gt;
-[all servers]$ chmod 600 /var/lib/pgsql/.pgpass
+[all servers]$ chmod 600 ~/.pgpass
</programlisting>
</sect3>
@@ -525,10 +546,10 @@ recovery_1st_stage_command = 'recovery_1st_stage'
recovery_2nd_stage_command = 'recovery_2nd_stage'
</programlisting>
The sample scripts
- <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/replication_mode_recovery_1st_stage.sample;hb=refs/heads/V4_4_STABLE">replication_mode_recovery_1st_stage.sample</ulink>,
- <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/replication_mode_recovery_2nd_stage.sample;hb=refs/heads/V4_4_STABLE">replication_mode_recovery_2nd_stage.sample</ulink>
+ <ulink url="https://raw.githubusercontent.com/pgpool/pgpool2/refs/heads/master/src/sample/scripts/replication_mode_recovery_1st_stage.sample">replication_mode_recovery_1st_stage.sample</ulink>,
+ <ulink url="https://raw.githubusercontent.com/pgpool/pgpool2/refs/heads/master/src/sample/scripts/replication_mode_recovery_2nd_stage.sample">replication_mode_recovery_2nd_stage.sample</ulink>
and
- <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/pgpool_remote_start.sample;hb=refs/heads/V4_4_STABLE">pgpool_remote_start.sample</ulink>
+ <ulink url="https://raw.githubusercontent.com/pgpool/pgpool2/refs/heads/master/src/sample/scripts/pgpool_remote_start.sample">pgpool_remote_start.sample</ulink>
are installed in <filename>/etc/pgpool-II/</filename>.
Create the scripts used by online recovery command from sample scripts and copy these files to the database cluster directory.
</para>