<div dir="ltr"><div dir="ltr">Hi Bo,<div>In fact the I only start pgpool service in all servers with</div><div>systemctl start pgpool</div><div><br></div><div>And only start the postgres on the primary with</div><div>systemctl start postgresql-12</div><div><br></div><div>The postgres service started on server 2 &amp; 3 as replication is to execute pcp_recovery_node command with specify the VIP as the host the same as the official guidance:</div><div><h3 style="font-size:1.2em;margin:1.2em 0em;color:rgb(236,88,0);font-family:verdana,sans-serif"><a name="m_-2347105218546801394_EXAMPLE-CLUSTER-TRY-STANDBY">8.3.7.1. Set up PostgreSQL standby server</a></h3></div><div><a name="m_-2347105218546801394_EXAMPLE-CLUSTER-TRY-STANDBY"><pre style="white-space:pre-wrap;border-color:rgb(207,207,207);background-color:rgb(247,247,247);color:rgb(0,0,0);border-width:1px;border-style:solid;padding:2ex;margin-top:2ex;margin-bottom:2ex;margin-left:2ex;overflow:auto;border-radius:8px">    # pcp_recovery_node -h 192.168.137.150 -p 9898 -U pgpool -n 1
    Password: 
    pcp_recovery_node -- Command Successful

    # pcp_recovery_node -h 192.168.137.150 -p 9898 -U pgpool -n 2
    Password: 
    pcp_recovery_node -- Command Successful</pre></a></div></div><div><br></div><div>The configuration of pgpool is nearly the same with <a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html#EXAMPLE-CLUSTER-PRE-SETUP" target="_blank">https://www.pgpool.net/docs/latest/en/html/example-cluster.html#EXAMPLE-CLUSTER-PRE-SETUP</a></div><br><div class="gmail_quote"><div class="gmail_attr">Thanks.</div><div dir="ltr" class="gmail_attr">.</div><div class="gmail-yj6qo gmail-ajU" style="outline:none;padding:10px 0px;width:22px;margin:2px 0px 0px"><div id="gmail-:1cw" class="gmail-ajR" tabindex="0" style="background-color:rgb(232,234,237);border:none;clear:both;line-height:6px;outline:none;width:24px;border-radius:5.5px"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif" style="background: url(&quot;https://www.gstatic.com/images/icons/material/system/1x/more_horiz_black_20dp.png&quot;) 50% 50% / 20px no-repeat; height: 11px; opacity: 0.54; width: 24px;"></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 11, 2020 at 10:47 PM Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Sun, 9 Aug 2020 17:05:01 +0800<br>
&quot;J.L.&quot; &lt;<a href="mailto:wantdrink@gmail.com" target="_blank">wantdrink@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi there,<br>
&gt; <br>
&gt; I&#39;ve installed pgpool 4.1.2 and postgresql 12.3 with watchdog based on<br>
&gt; <a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/example-cluster.html</a>.<br>
&gt; That is 3 machines with a VIP, pgpool service + watchdog service +<br>
&gt; postgresql service running on each of them, 1 primary + 2 standby<br>
&gt; postgresql.<br>
&gt; The question is: is that possible to enable those services as auto started<br>
&gt; even if I reboot all of them?<br>
&gt; <br>
&gt; I checked running services on them:<br>
&gt; <br>
&gt; [root@primary ~]# systemctl status postgresql-12<br>
&gt; &gt; postgresql-12.service - PostgreSQL 12 database server<br>
&gt; &gt;    Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;<br>
&gt; &gt; disabled; vendor preset: disabled)<br>
&gt; &gt;    Active: active (running) since Thu 2020-07-02 22:17:35 CDT; 1 months 6<br>
&gt; &gt; days ago<br>
&gt; &gt;<br>
&gt; &gt; [root@secondary1 ~]# systemctl status postgresql-12<br>
&gt; &gt; postgresql-12.service - PostgreSQL 12 database server<br>
&gt; &gt;    Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;<br>
&gt; &gt; disabled; vendor preset: disabled)<br>
&gt; &gt;    Active: inactive (dead)<br>
&gt; &gt;<br>
&gt; &gt; [root@secondary2 ~]# systemctl status postgresql-12<br>
&gt; &gt; postgresql-12.service - PostgreSQL 12 database server<br>
&gt; &gt;    Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;<br>
&gt; &gt; disabled; vendor preset: disabled)<br>
&gt; &gt;    Active: inactive (dead)<br>
&gt; <br>
&gt; <br>
&gt; So the postgresql service on secondary 1 &amp; 2 is not started by postgresql<br>
&gt; service, they are triggered by pgpool with command like:<br>
&gt; <br>
&gt; &gt; /usr/pgsql-12/bin/postgres -D /var/lib/pgsql/12/data<br>
<br>
Sorry, I could not understand the configuration.<br>
May I ask how you configure pgpool to execute command above?<br>
<br>
&gt; And on the primary the ps aux shows<br>
&gt; <br>
&gt; &gt; /usr/pgsql-12/bin/postmaster -D /var/lib/pgsql/12/data/<br>
&gt; <br>
&gt; <br>
&gt; Which means I can enable pgpool service on all 3 machines:<br>
&gt; <br>
&gt; &gt; systemctl enable pgpool<br>
&gt; <br>
&gt; <br>
&gt; But shouldn&#39;t do the same for postgresql service like systemctl enable<br>
&gt; postgresql-12.<br>
&gt; Also I&#39;m not sure if enabling services to start automatically will lead to<br>
&gt; any issue.<br>
&gt; <br>
&gt; Any suggestion or guidance about this is appreciated. I just want to make<br>
&gt; the DB system recover even after rebooting.<br>
&gt; <br>
&gt; Thanks.<br>
<br>
<br>
-- <br>
Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>&gt;<br>
SRA OSS, Inc. Japan<br>
</blockquote></div>