Unix Technical Forum

Master-master replication with PostgreSQL

This is a discussion on Master-master replication with PostgreSQL within the Pgsql General forums, part of the PostgreSQL category; --> Hello We're looking for an open-source database solution that has a Python interface and will do master-master replication. My ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 05:09 PM
Rob Collins
 
Posts: n/a
Default Master-master replication with PostgreSQL

Hello

We're looking for an open-source database solution that has a Python
interface and will do master-master replication. My client has a flawed MS
SQL Server system, with the replication hand-coded in Python. They don't
want to pay very high licence fees for the MS SQL Server Enterprise version
at 20 sites across the UK.

There is one central server with 19 branches. Some tables need to replicate
from the central server to the branches. Other tables are centralised from
the branches into one totalling table at the centre. A few tables need to
replicate in both directions.

From what I've read, Slony-I does only master-slave replication and Slony-II
is not being actively developed. Is this right? Are there any viable
master-master replication tools for PostgreSQL. (They could be
commercial/paid for if necessary.)

Rob

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 05:09 PM
Julio Cesar =?ISO-8859-1?Q?S=E1nchez_Gonz=E1lez?=
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL


El mié, 16-04-2008 a las 12:13 +0100, Rob Collins escribió:
> Hello
>
> We're looking for an open-source database solution that has a Python
> interface and will do master-master replication. My client has a
> flawed MS SQL Server system, with the replication hand-coded in
> Python. They don't want to pay very high licence fees for the MS SQL
> Server Enterprise version at 20 sites across the UK.
>
> There is one central server with 19 branches. Some tables need to
> replicate from the central server to the branches. Other tables are
> centralised from the branches into one totalling table at the centre.
> A few tables need to replicate in both directions.
>
> From what I've read, Slony-I does only master-slave replication and
> Slony-II is not being actively developed. Is this right? Are there any
> viable master-master replication tools for PostgreSQL. (They could be
> commercial/paid for if necessary.)
>
> Rob


Try with bucardo ("http://bucardo.org/") may be help you .

Regards,

Julio Cesar Sánchez González.
www.sistemasyconectividad.com.mx
knowhow@sistemasyconectividad.com.mx



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 05:09 PM
Dimitri Fontaine
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL

Hi,

Le mercredi 16 avril 2008, Rob Collins a écritÂ*:
> There is one central server with 19 branches. Some tables need to replicate
> from the central server to the branches. Other tables are centralised from
> the branches into one totalling table at the centre. A few tables need to
> replicate in both directions.


I'm working on some projects here with this very need (and same scale), andI
plan to use londiste (master/slaves asynchronous solution) replication
solution, which I already use in production on some other project.

The fact is that we want the "branches" to still be fully available in caseof
network or central server failure, so we don't buy into synchronous
replication; which is not available yet into PostgreSQL as far as I know,
even if one of the basics building-block alternatives is provided into -core,
namely Two Phase Commit.
http://www.postgresql.org/docs/8.3/s...ansaction.html

You'll find londiste documentation at both following places, the latter is
up-to-date with last 2.1.6 release, the former I'm not sure about it.
http://skytools.projects.postgresql.org/doc/
http://pgsql.tapoueh.org/skytools/

Hope this helps, regards,
--
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIBfr1lBXRlnbh1bkRApwGAJ44UydsxYzh+YSPe5GYRj xOjAgZCgCgn/CR
CT4cKn4hLT711NNSYABaBoo=
=k+im
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 05:09 PM
Rob Collins
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL

Hello Dimitri

To clarify the requirement: much like you, we're not looking for synchronous
replication, which would be too slow. The branches and central server can be
different for about 5 to 10 minutes. But the branches need to be able to
function independently if the network or central goes down. Londiste looks
interesting, though the documentation seems a bit sparse. Is it really that
simple to set up, or is there a fair amount of trial and error in the setup
process?

Best wishes

Rob

On 16/04/2008, Dimitri Fontaine <dfontaine@hi-media.com> wrote:
>
> Hi,
>
> Le mercredi 16 avril 2008, Rob Collins a écrit :
>
> > There is one central server with 19 branches. Some tables need to

> replicate
> > from the central server to the branches. Other tables are centralised

> from
> > the branches into one totalling table at the centre. A few tables need

> to
> > replicate in both directions.

>
>
> I'm working on some projects here with this very need (and same scale),
> and I
> plan to use londiste (master/slaves asynchronous solution) replication
> solution, which I already use in production on some other project.
>
> The fact is that we want the "branches" to still be fully available in
> case of
> network or central server failure, so we don't buy into synchronous
> replication; which is not available yet into PostgreSQL as far as I know,
> even if one of the basics building-block alternatives is provided into
> -core,
> namely Two Phase Commit.
> http://www.postgresql.org/docs/8.3/s...ansaction.html
>
> You'll find londiste documentation at both following places, the latter is
> up-to-date with last 2.1.6 release, the former I'm not sure about it.
> http://skytools.projects.postgresql.org/doc/
> http://pgsql.tapoueh.org/skytools/
>
> Hope this helps, regards,
>
> --
> dim
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 05:09 PM
Vivek Khera
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL


On Apr 16, 2008, at 8:47 AM, Julio Cesar Sánchez González wrote:
>> From what I've read, Slony-I does only master-slave replication and
>> Slony-II is not being actively developed. Is this right? Are there
>> any
>> viable master-master replication tools for PostgreSQL. (They could be
>> commercial/paid for if necessary.)
>>
>> Rob

>
> Try with bucardo ("http://bucardo.org/") may be help you .


Doesn't bucardo handle conflicts with "whichever one I apply last
wins"? That doesn't seem safe in all situations (or any, IMO).


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 05:09 PM
Alvaro Herrera
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL

Julio Cesar Sánchez González wrote:
>
> El mié, 16-04-2008 a las 12:13 +0100, Rob Collins escribió:


> > We're looking for an open-source database solution that has a Python
> > interface and will do master-master replication. My client has a
> > flawed MS SQL Server system, with the replication hand-coded in
> > Python. They don't want to pay very high licence fees for the MS SQL
> > Server Enterprise version at 20 sites across the UK.
> >
> > There is one central server with 19 branches. Some tables need to
> > replicate from the central server to the branches.

>
> Try with bucardo ("http://bucardo.org/") may be help you .


Unfortunately, Bucardo only seems to work with 2 masters -- you can't
have 20.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 05:09 PM
Erik Jones
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL


On Apr 16, 2008, at 8:44 AM, Rob Collins wrote:
> Hello Dimitri
>
> To clarify the requirement: much like you, we're not looking for
> synchronous replication, which would be too slow. The branches and
> central server can be different for about 5 to 10 minutes. But the
> branches need to be able to function independently if the network or
> central goes down. Londiste looks interesting, though the
> documentation seems a bit sparse. Is it really that simple to set
> up, or is there a fair amount of trial and error in the setup process?


Yes, it really is pretty simple to set up. If you give it a shot and
run up against any issues or find something unclear, please, offer
suggestions or patches on the skytools mailing list.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-17-2008, 05:09 PM
Dimitri Fontaine
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL

Hi,

Le mercredi 16 avril 2008, Rob Collins a écritÂ*:
> To clarify the requirement: much like you, we're not looking for
> synchronous replication, which would be too slow. The branches and central
> server can be different for about 5 to 10 minutes. But the branches need to
> be able to function independently if the network or central goes down.


Exactly my need, with the addition that central edited tables and branches
local edited tables are disjoint sets, which makes the point for master/slave
replication choice.
I'm experiencing 1.5s and 4.8s average lag on my production setup, with
respectively 20tps and 200tps (insert/update/delete only).

> Londiste looks interesting, though the documentation seems a bit sparse. Is
> it really that simple to set up, or is there a fair amount of trial and
> error in the setup process?


I had the same question some time ago when I wanted to choose between londiste
and other solutions, and came to write up a part of the current
documentation.
In my experience, londiste is really that easy to set up, the only trial and
errors I've had where either bad reading of the doc (forgot to launch pgq
daemon, for example) or bad psycopg version usage.

In my case, but several people on skytools mailing-list have different
experience, I had to stick with psycopg 1 and avoid 2.0.5 (debian stable
version). YMMV.

I want to add skytools-users@pgfoundry.org mailing list is pretty responsive,
don't hesitate asking there

Regards,
--
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIBhF6lBXRlnbh1bkRAolMAKC5tFp1kWyCXrYmNXV7ai mI8fXD+QCfeO6+
EQrt8wqrUHzLDL703CGzf0s=
=giCI
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-17-2008, 05:09 PM
Dragan Zubac
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL

Hello

http://www.postgresql.at/english/pr_cybercluster_e.html

didn't test it myself though

Sincerely

Dragan

Rob Collins wrote:
> Hello Dimitri
>
> To clarify the requirement: much like you, we're not looking for
> synchronous replication, which would be too slow. The branches and
> central server can be different for about 5 to 10 minutes. But the
> branches need to be able to function independently if the network or
> central goes down. Londiste looks interesting, though the
> documentation seems a bit sparse. Is it really that simple to set up,
> or is there a fair amount of trial and error in the setup process?
>
> Best wishes
>
> Rob
>
> On 16/04/2008, *Dimitri Fontaine* <dfontaine@hi-media.com
> <mailto:dfontaine@hi-media.com>> wrote:
>
> Hi,
>
> Le mercredi 16 avril 2008, Rob Collins a écrit :
>
> > There is one central server with 19 branches. Some tables need

> to replicate
> > from the central server to the branches. Other tables are

> centralised from
> > the branches into one totalling table at the centre. A few

> tables need to
> > replicate in both directions.

>
>
> I'm working on some projects here with this very need (and same
> scale), and I
> plan to use londiste (master/slaves asynchronous solution) replication
> solution, which I already use in production on some other project.
>
> The fact is that we want the "branches" to still be fully
> available in case of
> network or central server failure, so we don't buy into synchronous
> replication; which is not available yet into PostgreSQL as far as
> I know,
> even if one of the basics building-block alternatives is provided
> into -core,
> namely Two Phase Commit.
> http://www.postgresql.org/docs/8.3/s...ansaction.html
>
> You'll find londiste documentation at both following places, the
> latter is
> up-to-date with last 2.1.6 release, the former I'm not sure about it.
> http://skytools.projects.postgresql.org/doc/
> http://pgsql.tapoueh.org/skytools/
>
> Hope this helps, regards,
>
> --
> dim
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-17-2008, 05:09 PM
Greg Sabino Mullane
 
Posts: n/a
Default Re: Master-master replication with PostgreSQL


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

>> Try with bucardo ("http://bucardo.org/") may be help you .


> Doesn't bucardo handle conflicts with "whichever one I apply last
> wins"? That doesn't seem safe in all situations (or any, IMO).


With Bucardo, conflict handling is chosen as a standard method
(of which one is "latest") or a custom handler. "Latest" has its
places, but the usual recommendation is to pick one of the servers
as the trusted source, or to write your own handler based on your
business logic.

http://www.bucardo.org/bucardo.html#...nflictHandling

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200804161143
http://biglumber.com/x/web?pk=2529DF...9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkgGHogACgkQvJuQZxSWSshdAACg6ouoh909Ts 1r40YwGscax2M1
y+gAoOQdOG7ToqnYNfVQ+3sS8ypBrpFS
=NC0p
-----END PGP SIGNATURE-----



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com