Re: Master-slave failover question

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
Cc: "Athanasios | ZenGuard" <athanasios(at)zenguard(dot)org>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Master-slave failover question
Date: 2014-01-07 16:16:12
Message-ID: CADp-Sm5FgArHTPJMXKgbvAdsT2=SpfAZH4fDdtdqDhZHWdnhxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Jan 7, 2014 at 4:53 AM, Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> wrote:

> On Fri, Jan 3, 2014 at 3:18 AM, Athanasios | ZenGuard
> <athanasios(at)zenguard(dot)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
>
>
I checked it out. Looks like the process involves manual identification of
failure(?). But this is a nice method for manual switchovers.

As a suggestion, won't it be a good idea to run the pgbouncer on
Application Server [so that even if the Master Server has to be shutdown,
IP address changes or starting pgbouncer on slave is not needed]?

> --
> 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(dot)ru(at)gmail(dot)com
>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin Grittner 2014-01-07 16:16:41 Re: how to add 'time with time zone' data types and 'interval' data types
Previous Message Binand Sethumadhavan 2014-01-07 15:57:26 Re: how to add 'time with time zone' data types and 'interval' data types