We've set up a primary server in archive mode to continuously archive to an NFS mount, and the standby server to continuously recovery from that directory (although I'm not sure that's actually working... I've probably overlooked something). The problem we face is working out how to tell the standby server that it is the primary. Yes this can be done with a trigger file in /tmp, but how would that automatically appear there? And when the failed server actually restarted, or the Postgres service restarts, how do we tell it that it is no longer the primary?
Thanks
Thom
2009/2/24 Simon Riggs <simon@xxxxxxxxxxxxxxx>
http://www.postgresql.org/docs/8.3/static/pgstandby.html
On Tue, 2009-02-24 at 16:55 +0000, Thom Brown wrote:
> We're looking at setting up a warm-standby server using log shipping
> and aren't too sure about how we should trigger failover. Is there a
> commonly-used approach which is reliable enough to recommend? Looking
> at the documentation, there doesn't seem to be any recommendation. I
> preferrably don't want to use a witness server.
>
> Also, what would you say is the best way to tell the failed primary
> server that it is no longer the primary server?
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support