Re: Master-slave failover question - Mailing list pgsql-novice

From Sergey Konoplev
Subject Re: Master-slave failover question
Date
Msg-id CAL_0b1s8rrd8WxV_6rtng5e1y4OdTB7C6xs9z9aEHBR0XoA_Kg@mail.gmail.com
Whole thread Raw
In response to Master-slave failover question  ("Athanasios | ZenGuard" <athanasios@zenguard.org>)
Responses Re: Master-slave failover question  (Sameer Kumar <sameer.kumar@ashnik.com>)
List pgsql-novice
On Fri, Jan 3, 2014 at 3:18 AM, Athanasios | ZenGuard
<athanasios@zenguard.org> wrote:
> Dear list,
> I hope that everyone has a nice holiday. Currently, I am researching
> master-slave automated promotion. I have one question. Let's assume that the
> clients connect to the master 192.168.1.1 for read/write traffic and I have
> a slave at 192.168.1.2. Assume that the master goes down and that slave gets
> promoted to a slave (this I have found out how to do automatically). How
> will the clients know to connect to the new master? Any ideas on this one?

One of the ideas, and BTW my favorite method, is to use PgBouncer to
redirect queries from master to slave with pause. The full description
of the process is by the link below.

https://github.com/grayhemp/pgcookbook/blob/master/switching_to_another_server_with_pgbouncer.md

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


pgsql-novice by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: how to add 'time with time zone' data types and 'interval' data types
Next
From: "Pagett, Lacey"
Date:
Subject: 0FATAL: too many connections for database