Re: High-Availability Question

From: Chander Ganesan <chander(at)otg-nc(dot)com>
To: iz(at)sai(dot)msu(dot)ru
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, proace(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: High-Availability Question
Date: 2006-07-06 00:26:08
Message-ID: 44AC58A0.6050201@otg-nc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Zolotukhin wrote:
> Hello,
>
>> > Third idea:
>> > I install the Slony-I, linux-ha and postgresql on the same server of
>> > the two 2U servers. The web application access to the db server
>> > directly and without pgpool.
>
> AFAIK, Slony does not have failover capabilities you need in HA solution:
>
> http://gborg.postgresql.org/project/slony1/genpage.php?howto_overview
>
> So you will need pgpool layer (or some other connection manager +
> network monitoring software) to detect failures anyway.
>
I believe the HA scripts would need to call the appropriate slonik
scripts to cause the failover to occur "properly" (calling the slonik
failover command). I think this is a viable option - albeit dangerous
(since some committed transactions might be lost). Normally, you'd also
have the HA script take over the IP of the master as well, but if you
used pgpool (in master/slave mode) then you could have it tell pgpool to
make the switchover for you. Keep in mind that if you ran a separate
pgpool server you'd want to ensure that it had a backup as well.

pgpool is nice, since when a master fails, the changes aren't lost on
the slave. However, AFAIK getting to the starting point (where both
servers are identical) would require the cluster to be down for a bit.
Slony-I does a much better job of this in that it performs the
replication itself (it will bring the slave up to a consistent state
automagically). However, that can be a time consuming task, depending
on how much data you have.

Just a thought, but I think it should be possible to use Slony-I to
bring a master and slave up to a consistent state, then perform a 'lock
set' then a 'wait for event' (to ensure both nodes are consistent), then
a disable of slony-I (so both nodes are writeable) then switch from
pgpool degeneration mode to replication mode. I think this would give
you the best of both worlds - pgpool without the startup downtime,
synchronous replication, etc. You'd have a "recovery period" where
Slony-I sync'd things up... You'd still have some of the pgpool
shortcomings (most notably things like 'select nexval()' type statements
and lack of secure authentication...but wouldn't suffer from data loss
in the case of a failure.

--
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC 27560
Phone: 877-258-8987/919-463-0999
http://www.otg-nc.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2006-07-06 01:03:24 Re: Help making a plpgsql function?
Previous Message Chris 2006-07-06 00:11:41 Re: RES: Phantom groups