Re: How do clients failover in hot standby/SR?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How do clients failover in hot standby/SR?
Date: 2012-02-01 10:48:32
Message-ID: 20120201104832.GA21585@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Herouth Maoz <herouth(at)unicell(dot)co(dot)il> wrote:

> We are looking at a replication solution aimed at high availability.
>
> So we want to use PostgreSQL 9's streaming replication/hot standby.
> But I seem to be missing a very basic piece of information: suppose
> the primary is host1 and the secondary is host2. Suppose that when
> host1 fails host2 detects that and creates the trigger file that
> causes the secondary to act as primary.
>
> How do all clients, which have connection strings aimed at host1 know
> to fail over and use host2?

You can, for instance, use pgpool as connection-pooler. pgpool can
detect a failed node, can create the trigger-file and connects clients
now to the other server.

>
> Is there a good Internet resource for reading on this?

google -> pgpool, for instance. There are other solutions, heartbeat for
instance (with flying service-ip's).

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pablo Fulco 2012-02-01 13:44:57 Server not starting problem
Previous Message Herouth Maoz 2012-02-01 10:28:00 How do clients failover in hot standby/SR?