<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Hi Anssi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">How did you fix your issue?&nbsp; Here’s my pgpool log.&nbsp; Is says it started recovery, but it hangs and doesn’t return “pcp_recovery_node -- command successful”.&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Tu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> pgpool-general-bounces@pgpool.net [mailto:pgpool-general-bounces@pgpool.net]
<b>On Behalf Of </b>Anssi Kanninen<br>
<b>Sent:</b> Friday, October 23, 2020 9:46 PM<br>
<b>To:</b> pgpool-general@pgpool.net<br>
<b>Subject:</b> [pgpool-general: 7317] Re: Setup Pgpool2 with Postgresql Streaming Replication<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I had a similar situation. The problem was that the data directory replication was successful but the script was waiting for DB remote restart. Check your pgpool log.<o:p></o:p></p>
<div>
<p class="MsoNormal">On 24 October 2020 10:04:25 EEST, &quot;Nguyen, Tu&quot; &lt;<a href="mailto:tnguyen3@honolulu.gov">tnguyen3@honolulu.gov</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<pre style="margin-bottom:12.0pt">Hi Tatsuo,<br><br>Can you tell me exactly which parameters in the &quot;recovery_1st_stage&quot; and &quot;pgpool_remote_start&quot; files I need to replace with my own server information?&nbsp; I think it may be some settings in there that is causing it to just hang when I run &quot;pcp_recovery_node -h 192.168.94.100 -p 9898 -U postgres&quot;&nbsp; from the primary server.&nbsp; It just stalls on the next line and doesn't do anything until I hit Ctrl &#43;C to cancel out of it.&nbsp; <br><br>Should I follow the instructions from this link:&nbsp; <br><a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html">https://www.pgpool.net/docs/latest/en/html/example-cluster.html</a><br><br>or<br><br>This Link:<br><a href="https://www.pgpool.net/docs/40/en/html/example-cluster.html">https://www.pgpool.net/docs/40/en/html/example-cluster.html</a><br><br><br>Thanks,<br>Alan<br><br>-----Original Message-----<br>From: Nguyen, Tu <br>Sent: Friday, October 23, 2020 12:06 PM<br>To: 'Tatsuo Ishii' &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>Cc: <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>Subject: RE: Setup Pgpool2 with Postgresql Streaming Replication<br><br><br>Hi all,<br><br>Looks like I may have been able to run the pcp_recovery_node command, but after I entered the password, it goes to the next line and just stays there, no errors or anything.&nbsp; Maybe it's stuck?&nbsp; I looked on the standby server node I'm trying to recover, with the &quot;top&quot; command and it says CPU usage is around 35% for the pg_basebackup command.&nbsp; It's been almost 5 hours like this.&nbsp; Does anyone know how long it takes?&nbsp; I heard that the standby recovery takes a long time, but does it really take this long?&nbsp; I have around 15 databases that totals about 300-500 MB of data that Pgpool2 is supposedly trying to recover right now.<br><br>Thanks,<br>Alan<br><br>-----Original Message-----<br>From: Tatsuo Ishii [<a href="mailto:ishii@sraoss.co.jp">mailto:ishii@sraoss.co.jp</a>]<br>Sent: Thursday, October 22, 2020 1:43 AM<br>To: Nguyen, Tu &lt;<a href="mailto:tnguyen3@honolulu.gov">tnguyen3@honolulu.gov</a>&gt;<br>Cc: <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>Subject: Re: Setup Pgpool2 with Postgresql Streaming Replication<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #729FCF 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre>2020-10-19 10:06:44.941 HST [24277] LOG:&nbsp; starting PostgreSQL 12.3 <br>(Ubuntu 12.3-1.pgdg16.04&#43;1) on x86_64-pc-linux-gnu, compiled by gcc <br>(Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609, 64-bit<o:p></o:p></pre>
</blockquote>
<pre style="margin-bottom:12.0pt"><br>The document is for CentOS, while you are using Ubuntu. I am not sure the documentation is useful for you or not. Anyway...<br><br>1) I need the PostgreSQL log while you are getting:<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #729FCF 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<blockquote style="border:none;border-left:solid #AD7FA8 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre>I'm at step 7.3.8.1 Set up PostgreSQL standby server:<br>Ran this command on the primary server: pcp_recovery_node -h<br>192.168.80.90 -p 9898 -U postgres -n 1 And received this error:<br>ERROR:&nbsp; recovery is checking if postmaster is started<br>DETAIL:&nbsp; postmaster on hostname:&quot;ltpgsql12&quot; database:&quot;template1&quot;<br>user:&quot;postgres&quot; failed to start in 90 second<o:p></o:p></pre>
</blockquote>
</blockquote>
<pre style="margin-bottom:12.0pt"><br>2) Do you follow the step &quot;7.3.4. Before Starting&quot;? I am asking because you got this error:<br><br>2020-10-19 13:10:23.521 HST [6757] postgres@postgres DETAIL:&nbsp; User &quot;postgres&quot; has no password assigned.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection matched pg_hba.conf line 8: &quot;host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; md5&quot;<br><br>Have you executed below in the documentation?<br><br>&nbsp; [server1]# psql -U postgres -p 5432<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# SET password_encryption = 'scram-sha-256';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# CREATE ROLE pgpool WITH LOGIN;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# CREATE ROLE repl WITH REPLICATION LOGIN;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# \password pgpool<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# \password repl<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres=# \password postgres<br><br><br><br>From: &quot;Nguyen, Tu&quot; &lt;<a href="mailto:tnguyen3@honolulu.gov">tnguyen3@honolulu.gov</a>&gt;<br>Subject: RE: Setup Pgpool2 with Postgresql Streaming Replication<br>Date: Thu, 22 Oct 2020 09:35:36 &#43;0000<br>Message-ID: &lt;<a href="mailto:F152F79048C4864E9825A767687750E404E82E97F0@CchExMail2.cchnl.hnl">F152F79048C4864E9825A767687750E404E82E97F0@CchExMail2.cchnl.hnl</a>&gt;<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #729FCF 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre style="margin-bottom:12.0pt">Hi Tatsuo,<br><br>Yes I'm using Pgpool-II version 4.0.<br><br>Ssh doesn't seem to be the issue, I was able to test ssh successfully <br>to both servers using this command from the new documentation:&nbsp; ssh <br>postgres@serverX -i ~/.ssh/id_rsa_pgpool<br><br>I have attached the postgresql-12-main.log file.<br><br>After we get the online recovery task fixed, are there recommended step by step instructions on how to best setup Postgresql Streaming Replication for Pgpool-II 4.0 clustering?&nbsp; When I execute the &quot;show pool_nodes&quot; command, the replication_state and replication_sync_state values are blank and data is not being replicated.<br><br>On another topic, can the Pgpool2 Connection Pooling feature handle 3,000-4,000 simultaneous connections effectively?<br><br>Thanks,<br>Alan<br><br><br>-----Original Message-----<br>From: Tatsuo Ishii [<a href="mailto:ishii@sraoss.co.jp">mailto:ishii@sraoss.co.jp</a>]<br>Sent: Wednesday, October 21, 2020 10:21 PM<br>To: Nguyen, Tu &lt;<a href="mailto:tnguyen3@honolulu.gov">tnguyen3@honolulu.gov</a>&gt;<br>Cc: <a href="mailto:pgsql-general@postgresql.org">pgsql-general@postgresql.org</a><br>Subject: Re: Setup Pgpool2 with Postgresql Streaming Replication<br><br>Hi Alan,<br><br>This is not the best forum to discuss Pgpool-II related topics. I advice you to go to the Pgpool-II dedicated forum:<br><br><a href="https://www.pgpool.net/mailman/listinfo/pgpool-general">https://www.pgpool.net/mailman/listinfo/pgpool-general</a><o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #AD7FA8 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre>Hi,<br><br>I'm following the steps from:<br><br><a href="https://access.crunchydata.com/documentation/pgpool/4.0.0/example-clu">https://access.crunchydata.com/documentation/pgpool/4.0.0/example-clu</a><br>s<br>ter.html<o:p></o:p></pre>
</blockquote>
<pre style="margin-bottom:12.0pt"><br>This documentation looks pretty old. The original and the latest documentation for Pgpool-II 4.0 is here (I assume you are using Pgpool-II 4.0):<br><br><br><br><br><a href="https://www.pgpool.net/docs/40/en/html/example-cluster.html">https://www.pgpool.net/docs/40/en/html/example-cluster.html</a><br><br>I strongly suggest to look into this.<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #AD7FA8 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre>I'm at step 7.3.8.1 Set up PostgreSQL standby server:<br>Ran this command on the primary server: pcp_recovery_node -h<br>192.168.80.90 -p 9898 -U postgres -n 1 And received this error:<br>ERROR:&nbsp; recovery is checking if postmaster is started<br>DETAIL:&nbsp; postmaster on hostname:&quot;ltpgsql12&quot; database:&quot;template1&quot;<br>user:&quot;postgres&quot; failed to start in 90 second<br><br>How can I get this command to run successfully?<o:p></o:p></pre>
</blockquote>
<pre style="margin-bottom:12.0pt"><br>Probably you have a problem with ssh settings. The newer and original document describes far detailed steps to set up ssh settings. Please take a look at &quot;7.3.2. Requirements&quot; section in the newer document.<br><br>In the mean time to confirm that the problem is related to ssh, we need to look into the PostgreSQL log (not Pgpool-II log) on primary PostgreSQL node. Please share it (again, you'd better to post messages to the pgpool-general mailing list).<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #AD7FA8 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre>Also, when I ran this command: psql -p 5433 -c &quot;show pool_nodes&quot;<br>It shows the following pgpool2 node status, but when I did a listing <br>of databases on the primary and standby servers, I don't see the <br>databases on the primary replicated to the standby.&nbsp; How can I setup <br>the Postgresql Streaming Replication and check if it's working?<o:p></o:p></pre>
</blockquote>
<pre style="margin-bottom:12.0pt"><br>Standby status is down because you failed to execute online recovery. You need to fix it.<o:p></o:p></pre>
<blockquote style="border:none;border-left:solid #AD7FA8 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in;margin-bottom:6.0pt">
<pre style="margin-bottom:12.0pt">node_id | hostname&nbsp; | port | status | lb_weight |&nbsp; role&nbsp;&nbsp; | select_cnt |<br>load_balance_node | replication_delay | replication_state | <br>replication_sync_state | last_status_change<br>---------&#43;-----------&#43;------&#43;--------&#43;-----------&#43;---------&#43;------------&#43;-------------------&#43;-------------------&#43;-------------------&#43;------------------------&#43;---------------------<br> 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | ltpgsql11 | 6432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | primary | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>| 2020-10-21 11:56:48<br> 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | ltpgsql12 | 6432 | down&nbsp;&nbsp; | 0.500000&nbsp; | standby | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>| 2020-10-21 11:56:48<br>(2 rows)<br><br><br>Thanks,<br>Alan<br><br><br><br>--<br>Sent from: <br><a href="https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html">https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html</a><br><br><o:p></o:p></pre>
</blockquote>
</blockquote>
<pre style="text-align:center"><hr size="2" width="100%" align="center"></pre>
<pre>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><o:p></o:p></pre>
</blockquote>
</div>
</div>
</body>
</html>