<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">Thanks for the quick reply! I think you are right, I didn&#39;t catch that. I&#39;ll try creating the extension in template1 but in the mean time, can I ask why pgpool is using the template1 database? </div><div dir="auto"><br></div><div dir="auto">I&#39;m connecting as postgres, not specifying a database. I would expect to connect to the postgres database. Have I misconfigured pgpool? </div><div dir="auto"><br></div><div dir="auto">If not, does that mean that pgpool requires template1 to exist on all clusters? That would seem an odd requirement to me. </div><div dir="auto"><br></div><div dir="auto">Thanks, </div><div dir="auto"><br></div><div dir="auto">Gavin </div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 29, 2018, 19:48 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  ERROR:  function<br>
&gt; &gt; pgpool_recovery(unknown, unknown, unknown, unknown) does not exist at<br>
&gt; &gt; character 8<br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  HINT:  No function<br>
&gt; &gt; matches the given name and argument types. You might need to add explicit<br>
&gt; &gt; type casts.<br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  STATEMENT:  SELECT<br>
&gt; &gt; pgpool_recovery(&#39;recover.sh&#39;, &#39;<a href="http://database-0.int.domain.org" rel="noreferrer noreferrer" target="_blank">database-0.int.domain.org</a>&#39;,<br>
&gt; &gt; &#39;/var/lib/pgsql/9.6/data&#39;, &#39;5432&#39;)<br>
<br>
The log means that pgpool_recovery function isn&#39;t installed in template1.<br>
<br>
&gt; I know what the response is going to be: &quot;You need to use CREATE EXTENSION<br>
&gt; to make your pgpool_recovery extension.&quot; I&#39;ve done that. <br>
<br>
Did you run CREATE EXTENSION in template1?<br>
<br>
<a href="http://www.pgpool.net/docs/latest/ja/html/install-pgpool-recovery.html" rel="noreferrer noreferrer" target="_blank">http://www.pgpool.net/docs/latest/ja/html/install-pgpool-recovery.html</a><br>
<br>
On Wed, 29 Aug 2018 12:11:48 -0600<br>
Gavin Medley &lt;<a href="mailto:medley@unavco.org" target="_blank" rel="noreferrer">medley@unavco.org</a>&gt; wrote:<br>
<br>
&gt; Hi all,<br>
&gt; <br>
&gt; I&#39;m setting up online recovery for a simple setup of two database that will<br>
&gt; &quot;flip back and forth&quot; if a master fails. My recovery.sh script (set in<br>
&gt; recovery_1st_stage_command) works fine when run manually on the (newly<br>
&gt; promoted) master to recover the downed previous primary to a standby state.<br>
&gt; However, pgPool seems to be having trouble automating the process through<br>
&gt; pcp_recovery_node.<br>
&gt; <br>
&gt; When I stop my primary and try to connect, failover is initiated, followed<br>
&gt; by online recovery. I see in the postgres logs:<br>
&gt; <br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  ERROR:  function<br>
&gt; &gt; pgpool_recovery(unknown, unknown, unknown, unknown) does not exist at<br>
&gt; &gt; character 8<br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  HINT:  No function<br>
&gt; &gt; matches the given name and argument types. You might need to add explicit<br>
&gt; &gt; type casts.<br>
&gt; &gt; [2018-08-29 16:05:16.995 UTC - template1:postgres]  STATEMENT:  SELECT<br>
&gt; &gt; pgpool_recovery(&#39;recover.sh&#39;, &#39;<a href="http://database-0.int.domain.org" rel="noreferrer noreferrer" target="_blank">database-0.int.domain.org</a>&#39;,<br>
&gt; &gt; &#39;/var/lib/pgsql/9.6/data&#39;, &#39;5432&#39;)<br>
&gt; <br>
&gt; This output is also there if I manually run pcp_recovery_node.<br>
&gt; <br>
&gt; I know what the response is going to be: &quot;You need to use CREATE EXTENSION<br>
&gt; to make your pgpool_recovery extension.&quot; I&#39;ve done that. I&#39;m using version<br>
&gt; 3.7.5 for both pgPool and its extensions and I&#39;m on CentOS7 running<br>
&gt; Postgres 9.6 from the official repo. Here&#39;s the yum output:<br>
&gt; <br>
&gt; &gt; Installed Packages<br>
&gt; &gt; pgpool-II-96.x86_64<br>
&gt; &gt;                                 3.7.5-1.rhel7<br>
&gt; &gt;                                                @pgdg96<br>
&gt; &gt; pgpool-II-96-extensions.x86_64<br>
&gt; &gt;                                  3.7.5-1.rhel7<br>
&gt; &gt;                                                @pgdg96<br>
&gt; <br>
&gt; <br>
&gt; Here&#39;s the confusing part. If I copy and paste the STATEMENT from the<br>
&gt; postgresql log and run it in the psql prompt, it works!<br>
&gt; <br>
&gt; &gt; SELECT pgpool_recovery(&#39;recover.sh&#39;, &#39;<a href="http://database-0.int.domain.org" rel="noreferrer noreferrer" target="_blank">database-0.int.domain.org</a>&#39;,<br>
&gt; &gt; &#39;/var/lib/pgsql/9.6/data&#39;, &#39;5432&#39;)<br>
&gt; <br>
&gt; returns &#39;t&#39; and I see my script output in the postgres logs. My new standby<br>
&gt; comes back up as expected.<br>
&gt; <br>
&gt; Am I missing something? How can I debug this?<br>
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; Gavin<br>
&gt; <br>
&gt; -- <br>
&gt; Gavin Medley<br>
&gt; Software Engineer I<br>
&gt; <br>
&gt; 6350 Nautilus Drive<br>
&gt; Boulder, CO 80301-5394<br>
&gt; <br>
&gt; o: 303-381-7584<br>
&gt; <a href="mailto:medley@unavco.org" target="_blank" rel="noreferrer">medley@unavco.org</a><br>
<br>
<br>
-- <br>
Bo Peng &lt;<a href="mailto:pengbo@sraoss.co.jp" target="_blank" rel="noreferrer">pengbo@sraoss.co.jp</a>&gt;<br>
SRA OSS, Inc. Japan<br>
<br>
</blockquote></div>