Thanks for the good explanation. So, pg_switch_xlog will generate the last WAL file for use, but the second stage script in the example doesn&#39;t copy any WAL file (in pg_xlog). Or will pg_switch_xlog also archive the WAL files just like pg_stop_backup does?<br>
<br><div class="gmail_quote">On Thu, Aug 30, 2012 at 10:51 AM, Lazáro Rubén García Martínez <span dir="ltr">&lt;<a href="mailto:lgarciam@vnz.uci.cu" target="_blank">lgarciam@vnz.uci.cu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In the first stage of online recovery you copy your data directory from primary node to detached node. In this stage, the primary server receives requests from users, then in the second stage of online recovery, the conections from clients need to waits until this stage ending. But, because in the first stage the primary server recive requests while you were copied your data directory to another node, in the shared buffers and wal buffers could by dirty blocks and is necesary to synchronize this dirty blocks to disk and generate a new wal segment that stablish the end of recovery process, this is the last wal to recovery.<br>

<br>
This is the perpose of forcing a log switch.<br>
<br>
Sorry for my bad english.<br>
<br>
Regards.<br>
________________________________________<br>
From: <a href="mailto:pgpool-general-bounces@pgpool.net">pgpool-general-bounces@pgpool.net</a> [<a href="mailto:pgpool-general-bounces@pgpool.net">pgpool-general-bounces@pgpool.net</a>] On Behalf Of Kent Tong [<a href="mailto:kent.tong.mo@gmail.com">kent.tong.mo@gmail.com</a>]<br>

Sent: Wednesday, August 29, 2012 8:34 PM<br>
To: Tatsuo Ishii<br>
Cc: <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
Subject: [pgpool-general: 931] Re: some questions about online recovery<br>
<div class="im"><br>
On Thu, Aug 30, 2012 at 6:49 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&lt;mailto:<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;&gt; wrote:<br>
That&#39;s a duty of archive command.<br>
<br>
Fair enough. So, that example assumes that the postgreSQL WAL archive (where the archive_command copies to) is accessible by all the nodes?<br>
<br>
pgpool_switch_xlog does more than pg_switch_xlog. It waits for log<br>
switching completion by looking at $archdir.<br>
<br>
Yes, I know. But what is the purpose of forcing a log switch?<br>
<br>
Thanks!<br>
<br>
</div>________________________________<br>
Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!<br>
<a href="http://www.antiterroristas.cu" target="_blank">http://www.antiterroristas.cu</a><br>
<a href="http://justiciaparaloscinco.wordpress.com" target="_blank">http://justiciaparaloscinco.wordpress.com</a><br>
<br>
Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!<br>
<a href="http://www.antiterroristas.cu" target="_blank">http://www.antiterroristas.cu</a><br>
<a href="http://justiciaparaloscinco.wordpress.com" target="_blank">http://justiciaparaloscinco.wordpress.com</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Kent Tong</div><div>IT author and consultant, child educator</div><br>