<div dir="ltr"><p dir="ltr">Hey Tatsuo, thanks for the answer.</p><p>I am actually running pg_basebackup from the command line.</p><p>If i run it through pgpool (which listens in port 9999):</p><p>pg_basebackup -X stream -h myhost -p 9999 -D /var/lib/pgsql/9.5/data -U replication -v -P</p><p>It fails with the mentioned descriptions.</p><p>If i run it to port 5432 (where postgresql backend listens) It works.</p><p>That is the reason i posted question in this list, i only seem to be having this issue when going through pgpool.</p><p>Any pointers on how to troubleshoot the issue would be appreciated.</p><p><br></p><p>Thanks a lot!</p><p>Regards<br></p><p><br></p><p dir="ltr">On Apr 18, 2016 10:27 PM, &quot;Tatsuo Ishii&quot; &lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt; wrote:<br type="attribution"></p><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I assume you invoke pg_basebackup from recovery_1st_stage_command.<br>
<br>
If pg_basebackup succeeds when you invoke it by hand, there&#39;s possibility that:<br>
<br>
- the difference between process owner. recovery_1st_stage_command is<br>
  executed by the same owner as pgpool.<br>
<br>
- wrong parameter passed to pg_basebackup. You can log the parameters<br>
  for pg_basebackup by tweaking recovery_1st_stage_command.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; Hello Guys:<br>
&gt; I was wondering if anyone here has tried to use pg_basebackup with the<br>
&gt; -X=stream option over pgpool.<br>
&gt; I a<br>
&gt;<br>
&gt; I am using postgresql 9.5.2 with pgpool 3.5.1  an issue where when i try to<br>
&gt; do this, pg_basebackup hangs on the following line of the progress report:<br>
&gt;<br>
&gt; pg_basebackup: waiting for background process to finish streaming ...<br>
&gt;<br>
&gt; and then it just quits with the following errors:<br>
&gt;<br>
&gt; pg_basebackup: unexpected termination of replication stream: FATAL:  unable<br>
&gt; to read data from DB node 0<br>
&gt; DETAIL:  EOF encountered with backend<br>
&gt; pg_basebackup: child process exited with error 1<br>
&gt;<br>
&gt;<br>
&gt; from the backend point of view, i see the following:<br>
&gt; &lt; 2016-04-18 14:34:33.376 ADT &gt;LOG:  terminating walsender process due to<br>
&gt; replication timeout<br>
&gt; &lt; 2016-04-18 14:34:33.384 ADT &gt;ERROR:  syntax error<br>
&gt;<br>
&gt; pg_basebackup works ok with the fetch option (But i would like to avoid<br>
&gt; using it, as it would require for me to also implement PITR, or to stop<br>
&gt; transactions to the DB)<br>
&gt;<br>
&gt; pg_basebackup works ok if i connect directly to the backend<br>
&gt;<br>
&gt; Any ideas how i could troubleshoot this?<br>
&gt; Thanks.<br>
&gt; Regards<br>
</blockquote></div>
</div>