Re: Improving Availability - Mailing list pgsql-general

From Richard Huxton
Subject Re: Improving Availability
Date
Msg-id 43A03E69.6040608@archonet.com
Whole thread Raw
In response to Improving Availability  (Guido Neitzer <guido.neitzer@pharmaline.de>)
Responses Re: Improving Availability
List pgsql-general
Guido Neitzer wrote:
> Hi.
>
> I have two server boxes (Apple Xserve G5). WebServers and applications
> are installed on both machines, the load is distributed by a
> loadbalancer to both machines.
>
> How can I make a setup in a way that the database is also tolerant
> against failure? What I actually need is a mechanism that keeps both
> machines synchronized.
>
> What is the way to go for this?

It depends on how "failsafe" you want to be.

You could use log-shipping and PITR (see manuals) to make sure machine 2
can be restored to where machine 1 was "recently".

You could use replication (e.g. Slony) To copy transactions from machine
1 to machine 2.

You could use something like pgpool to copy queries to both servers. You
need to make sure you understand the implications of this as regards
timestamps and auto-generated numbers etc. It might be worth having
pgpool in place anyway for your setup.

You could have a dual-attached disk system, and then when one machine
fails, the other could start up its postgresql server (but make sure
both never try to run at once).

I'd be tempted to look at pgpool sitting between your application and
the database, and then replication from the one machine to the other.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Improving Availability
Next
From: "Joshua D. Drake"
Date:
Subject: Re: ANN: PgBrowse 1.4