B
B
bora_bora2015-05-14 07:57:48
PostgreSQL
bora_bora, 2015-05-14 07:57:48

How to implement failover?

What is the best and most reliable way to implement failover for PostgreSQL (automatic switching from master to slave in case of a master crash)?
On the Internet I found only a mention of Pgpool-II, but perhaps there are more options? Some write that there are incidents with pgpool-II and the master-master configuration happens.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-05-14
@liff

I have this scheme organized with two Pgpoll-2 and two database servers (4 servers in total). Moreover, servers with pgpool-2 monitor availability using watchdog. The scheme as a whole is described here habrahabr.ru/post/188096 and even better here habrahabr.ru/post/213409 . The only difference from the last link is that we are using a replication slot (introduced in postgresql 9.4).
When the master falls, the slave becomes the master, when the old master is revived, everything returns back. We use two pgpools for backup in case one of them is unavailable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question