Hello,<div><br></div><div>I am testing a setup with pgpool with two postgres nodes in replication mode.</div><div><br></div><div>I tested the recovery where one postgres node goes down and I try to recover from the other remaining node. In my test, I find that the first stage recovery script (base recovery : basebackup.sh ) does not run. I tried to drop the database on the second node. Even in this condition, only the incremental transactions were applied and the node status was `2`  (up and accepting connections). </div>
<div><br></div><div>What triggers the execution of the base recovery script?</div><div><br></div><div><br></div><div>Here is the pgpool log on node 0 during the recovery:</div><div><br></div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><font face="courier new, monospace">2013-07-16 08:24:20 LOG:   pid 32565: starting recovering node 1</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:20 LOG:   pid 32565: CHECKPOINT in the 1st stage done</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:20 LOG:   pid 32565: starting recovery command: &quot;SELECT pgpool_recovery(&#39;basebackup.sh&#39;, &#39;192.168.0.103&#39;, &#39;/var/lib/pgsq</font></div>
</div><div><div><font face="courier new, monospace">l&#39;)&quot;</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:21 LOG:   pid 32565: 1st stage is done</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:21 LOG:   pid 32565: starting 2nd stage</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:21 LOG:   pid 32565: all connections from clients have been closed</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:21 LOG:   pid 32565: CHECKPOINT in the 2nd stage done</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:21 LOG:   pid 32565: starting recovery command: &quot;SELECT pgpool_recovery(&#39;pgpool_recovery_pitr&#39;, &#39;192.168.0.103&#39;, &#39;/var/l</font></div>
</div><div><div><font face="courier new, monospace">ib/pgsql&#39;)&quot;</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32565: check_postmaster_started: try to connect to postmaster on hostname:192.168.0.103 database:postgres</font></div>
</div><div><div><font face="courier new, monospace">user:postgres (retry 0 times)</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32565: 1 node restarted</font></div></div><div>
<div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32565: send_failback_request: fail back 1 th node request from pid 32565</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 24385: starting fail back. reconnect host 192.168.0.103(5432)</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 24385: Restart all children</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 24385: failover: set new primary node: -1</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 24385: failover: set new master node: 0</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 24385: failback done. reconnect host 192.168.0.103(5432)</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32565: recovery done</font></div></div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32564: worker process received restart request</font></div>
</div><div><div><font face="courier new, monospace">2013-07-16 08:24:25 LOG:   pid 32690: connection received: host=192.168.0.102 port=35052</font></div></div></blockquote><div><br></div><div>As you can see, the first stage is not done. However it would be required since I droppped the database on node 1.</div>
<div><br></div><div>Thanks</div><div><br></div><div>Gilbert</div>