On Fri, Mar 05, 2004 at 09:15:59AM +0800, Jagi C. Sarcilla wrote:
> anyone implemented postgresql with fail-over (clustered in think) I
> need inputs about it, your help is highly appreciated.

There are at least two approaches available that I'm aware of.

The first approach is a general high-availability solution using
Heartbeat[1], DRBD[2] and of course, PostgreSQL and the GNU/Linux
operating system, preferably with a journalling filesystem like ext3[3]
or ReiserFS[4] (I prefer XFS[5], but it won't be supported by DRBD until
DRBD v0.7 because XFS uses dynamic block sizes).

Heartbeat handles the high-availability component, mounting and
unmounting filesystems, bringing up and taking down IP aliases and
starting up and shutting down programs as needed.

DRBD provides something like a network-based RAID-1, with one node
having an active copy and the other node having a realtime mirror that
goes live when the primary node goes down.

I've tested the Heartbeat+DRBD approach for a Samba fileserver + Cyrus
mail server + DHCP3 server, and it worked out very well. Both nodes were
connected using GbE via a crossover cable for heartbeat communication
and DRBD replication and were connected to the rest of the world via
standard 100Mbps Ethernet. Failover and data synchronization was
flawless (well... except for WINS propagation for the Samba server which
had much to be desired from).

PostgreSQL is known to work well with this type of a high-availability
setup, and it is recommended if you want other services to be
highly-available as well. The main drawback of the Heartbeat approach is
that the inactive node is idle most of the time (unless you set up an
active-active type of cluster).

An alternative approach puts a middle-person in between the rest of the
world and your PostgreSQL databases. One such middleware is
DBBalancer[6] currently at v0.4.0ALPHA.

The DBBalancer approach adds a single point of failure, but provides
high-availability in the sense that you have two or more PostgreSQL
databases with the same data. One strong point of the DBBalancer
approach over the Heartbeat approach is that you have load balancing for
a theoritical improvement in read performance.

At present the DBBalancer has other drawbacks aside from the obvious
SPoF. A major killer for some might be that it only supports trust and
cleartext password authentication methods (for now, anyway).

 --> Jijo

[1] http://www.linux-ha.org/heartbeat/
[2] http://www.drbd.org/
[3] http://www.redhat.com/support/wpapers/redhat/ext3/index.html
[4] http://www.namesys.com/
[5] http://oss.sgi.com/projects/xfs/
[6] http://dbbalancer.sourceforge.net/

-- 
Federico Sevilla III    : Free & Open Source Software : When we speak of free
http://jijo.free.net.ph : Consultant & Administrator  : software we refer to
GnuPG Key ID            : 0x93B746BE                  : freedom, not price.
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to