On Thu, 2005-06-02 at 01:13 +0300, pgsql-general@list.coretech.ro wrote:
> In this case do you know what is the timeout on the "restore_command"
> command (or where I can find it in documentation).
There isn't one. You decide when restore_command returns.
> What will happen if I make the restore command wait for a new WAL file
> to become available ?
You will succeed. PostgreSQL doesn't know anything about what your
program does. The design allows for various delays that could be caused
by:
- hot standby waits
- extended waits for tape mounts by human operators
etc
> And, most important, how do I distinguish between WAL files that should
> be in the archive from those that should not be in the archive, because
> I see in the documentation that "The command /will/ be asked for log
> files that are not present in the archive; it must return nonzero when
> so asked" ?
You program restore_command to wait, but if an event occurs that
triggers failover (you decide...) you return nonzero.
> Are timelines helping me in this case ?
Not really. They are for when you do a recovery to a specific target,
rather than a recovery to end of logs.
Best Regards, Simon Riggs