Re: Database Mirroring Solution - Mailing list pgsql-general

From Richard Huxton
Subject Re: Database Mirroring Solution
Date
Msg-id 45546901.5020500@archonet.com
Whole thread Raw
In response to Database Mirroring Solution  (Gideon <gideondebian@isogo.co.za>)
Responses Re: Database Mirroring Solution  (Gideon <gideondebian@isogo.co.za>)
List pgsql-general
Gideon wrote:
> Thanks for the quick reply.

No problem, but don't forget to cc: the list.

> We basicaly need to run a database servers in 2 different
> towns. Now there will be update's and selects and both need
> to be in sync with each other. Aswell as if / when database in
> town 1 goes down ... we need to be able to switch to the database
> in town 2 for emergency purposes. We cannot use just one master
> as the connectivity between the two towns isn't fast enough for
> the amount of users that will be viewing data through the connection.
>
> (The fastest affordable connection here for this purpose is round about
> 256k.)

A slow link is going to cause problems with most replication solutions
anyway. Well, there are two options that I can think of:

Option 1:
Run Slony replicating from town1 to town2.
Run PgPool connection pooling at town2 and route any update queries to
town1.
Cope with the delay on updates propagating.

Option 2:
Use table partitioning to split e.g. customers by town.
Use slony to replicate customers_town1 to town2 and customers_town2 to
town1.
Users can't update data "owned" by the other town - enforce this with
suitable GRANT/REVOKE.

Either of those any use?
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Enrico
Date:
Subject: Re: Database Mirroring Solution
Next
From: "Albe Laurenz"
Date:
Subject: Re: ECPG and multiple threads