<div dir="ltr">Hi all,<div><br></div><div>I&#39;m setting up online recovery for a simple setup of two database that will &quot;flip back and forth&quot; if a master fails. My recovery.sh script (set in recovery_1st_stage_command) works fine when run manually on the (newly promoted) master to recover the downed previous primary to a standby state. However, pgPool seems to be having trouble automating the process through pcp_recovery_node. </div><div><br></div><div>When I stop my primary and try to connect, failover is initiated, followed by online recovery. I see in the postgres logs:</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[2018-08-29 16:05:16.995 UTC - template1:postgres]  ERROR:  function pgpool_recovery(unknown, unknown, unknown, unknown) does not exist at character 8<br>[2018-08-29 16:05:16.995 UTC - template1:postgres]  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.<br>[2018-08-29 16:05:16.995 UTC - template1:postgres]  STATEMENT:  SELECT pgpool_recovery(&#39;recover.sh&#39;, &#39;<a href="http://database-0.int.domain.org/" target="_blank">database-0.int.domain.org</a>&#39;, &#39;/var/lib/pgsql/9.6/data&#39;, &#39;5432&#39;)</blockquote><div>This output is also there if I manually run pcp_recovery_node.</div><div><br></div><div>I know what the response is going to be: &quot;You need to use CREATE EXTENSION to make your pgpool_recovery extension.&quot; I&#39;ve done that. I&#39;m using version 3.7.5 for both pgPool and its extensions and I&#39;m on CentOS7 running Postgres 9.6 from the official repo. Here&#39;s the yum output:</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Installed Packages<br>pgpool-II-96.x86_64                                                                                        3.7.5-1.rhel7                                                                             @pgdg96<br>pgpool-II-96-extensions.x86_64                                                                             3.7.5-1.rhel7                                                                             @pgdg96</blockquote></div><div><br></div><div>Here&#39;s the confusing part. If I copy and paste the STATEMENT from the postgresql log and run it in the psql prompt, it works! </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">SELECT pgpool_recovery(&#39;recover.sh&#39;, &#39;<a href="http://database-0.int.domain.org/" target="_blank">database-0.int.domain.org</a>&#39;, &#39;/var/lib/pgsql/9.6/data&#39;, &#39;5432&#39;)</blockquote><div>returns &#39;t&#39; and I see my script output in the postgres logs. My new standby comes back up as expected.</div><div><br></div><div>Am I missing something? How can I debug this?</div><div><br></div><div>Cheers,</div><div><br></div><div>Gavin</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif">Gavin Medley<br></span></font></span><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif">Software Engineer I</span></font></span></div><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif"></span></font><br><span><img src="https://docs.google.com/uc?export=download&amp;id=0B8yiNfO2e9cpOTJzdTl4U3JxUFE&amp;revid=0B8yiNfO2e9cpbkNDdEdscHhZNzBJTkE2RkFWRmdVa3FTaW1NPQ" style="font-size: 12.8px;" width="200" height="50"></span><font size="2"><span style="font-family:arial,helvetica,sans-serif"></span></font></span></div><div><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif">6350 Nautilus Drive<br></span></font></span></div><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif"><span>Boulder, CO 80301-5394</span></span></font></span></div><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif"><span><br></span></span></font></span></div><div><span style="color:rgb(102,102,102)"><font size="2"><span style="font-family:arial,helvetica,sans-serif"><span>o: 303-381-7584</span></span></font></span></div></div><div><span style="color:rgb(0,0,0)"><font size="2"><span style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(102,102,102)"><a href="mailto:medley@unavco.org" target="_blank">medley@unavco.org</a></span><br></span></font></span></div></div></div></div></div></div></div></div>