Implementing failover logic is quite simple, and probably even preferred over a pre-built solution because you can implement it in the way that integrates well with your architecture.
The basic logic is as follows:
- On the standby server you would configure the "trigger" file. When you create a trigger file with the name you specify the standby will promote to master.
- You have your queries send to the master.
- If your application starts failing to connect to the master you would have logic evaluate why
- When the master goes down you should
- Generate a trigger file to promote the standby to master
- Modify your DNS entries to have your applications point to the new master
Will J. Dunn
On Tue, Jul 21, 2015 at 12:20 PM, Aviel Buskila <aviel33@xxxxxxxxx> wrote:
hey will,Is there any open-source tool instead of developing the fail-over logic by myself?2015-07-21 18:34 GMT+03:00 William Dunn <dunnwjr@xxxxxxxxx>:Hello Aviel,On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila <aviel33@xxxxxxxxx> wrote:How can I set a highly available postgresql in a share-nothing architecture?I suggest you review the official documentation on high-availability configurations linked below:The most common configuration is to use PostgreSQL's built in master/standby streaming replication. However you will need to develop any fail-over logic you need yourself or use a third party tool such as EnterpriseDB's Failover Manager.Will J. DunnOn Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila <aviel33@xxxxxxxxx> wrote:Hey,How can I set a highly available postgresql in a share-nothing architecture?Best regards,Aviel B.