Re: Tutorials on high availability Postgresql setup?

From: Digimer <linux(at)alteeve(dot)com>
To: Andy <angelflow(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tutorials on high availability Postgresql setup?
Date: 2010-10-07 14:42:15
Message-ID: 4CADDC47.3090005@alteeve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10-10-07 02:27 AM, Andy wrote:
> Is there any tutorials or detailed instructions on how to set up HA postgresql & failover? The documentation (http://www.postgresql.org/docs/9.0/interactive/warm-standby-failover.html) on this topics is pretty scarce.
>
> The scenario I'm most interested in is this:
>
> 2 servers - a master and a hot standby. All writes are sent to master, reads are split between master and hot standby.
>
> 1) If the hot standby goes down, how do I redirect reads to the master?
> 2) If the master fails
> -how do I automatically promote the standby to master and send all reads/writes to the new master?
> -what happens when the old master comes back up? Do I need to so anything to make it catches up to the new master?
>
> Thanks.

One option would be to create a simple 2-node cluster and run your PgSQL
server in a migrateable VM backed by a SAN or, if your budget is more
modest, a simple DRBD device.

Personally, I like to use RHCS (Red Hat Cluster Services) with a DRBD
array becking clustered LVM with Xen VMs (domU) on dedicated LVs. This
doesn't dictate the OS version hosting postgres though, so if you've got
a particular set of requirement, you can meet them.

Then in the case of planned outage, you can hot-migrate your VM to the
other node. In the case of catastrophic failure, the surviving node can
boot the PgSQL server and it would come back as if it had simply lost
power. In either case, you don't need to worry about IPs, special
configs or what have you.

--
Digimer
E-Mail: linux(at)alteeve(dot)com
AN!Whitepapers: http://alteeve.com
Node Assassin: http://nodeassassin.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-10-07 14:53:51 Re: PostgreSQL 7.4.16 is creating strange files under /var/lib/pgsql
Previous Message Juan Sueiro 2010-10-07 14:28:36 Re: PostgreSQL 7.4.16 is creating strange files under /var/lib/pgsql