Slony-I for circular replication

Lists: pgsql-hackers
From: Bojidar Mihajlov <bmihajlov(at)yahoo(dot)com>
To: pg-dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Slony-I for circular replication
Date: 2006-03-30 13:34:30
Message-ID: 20060330133430.67700.qmail@web36101.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi All;

Can Slony-I be used for circular replication (A
<replicates> B <replicates> A)
or there is some kind of problem with locking or
anything else?
If I avoid insert conflicts will the following
scenario succeed for the updates :
A: X.balance-= 5
B: X.balance-= 3
A receives the update from B (X.balance -= 3)
B receives the update from A (X.balance -= 5)
or it will lead to deadlock ?
Nodes A and B will reside at different geografical
locations.
I'll use only node A to service both locations in the
most time and B for redundancy.
But the case of broken connection between node A and B
could lead to scenarios
like latter because then A and B will service their
own location. Could such a scenarios
be detected and logged ?
What happen in case of a conflict (dublicated primary
key/update deleted) ?
Could the performed action be managed ?

Regards,
Bozhidar Mihaylov

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Bojidar Mihajlov <bmihajlov(at)yahoo(dot)com>
Subject: Re: Slony-I for circular replication
Date: 2006-03-30 14:22:38
Message-ID: 200603300922.38542.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thursday 30 March 2006 08:34, Bojidar Mihajlov wrote:
> Hi All;
>
> Can Slony-I be used for circular replication (A
> <replicates> B <replicates> A)
> or there is some kind of problem with locking or
> anything else?

Sounds like you want some kind of synchronous federated multi-master
repication... which Slony-I wont do and I don't know of any system that will.
You might be able to get some of that functionality using views and multiple
replication sets, but that conversation really ought to take place on a more
appropriate list, like the Slony list for example.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, bmihajlov(at)yahoo(dot)com
Subject: Re: Slony-I for circular replication
Date: 2006-03-30 15:15:21
Message-ID: 20060330101521.30a9a77e.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 30 Mar 2006 09:22:38 -0500
Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> wrote:
> On Thursday 30 March 2006 08:34, Bojidar Mihajlov wrote:
> > Can Slony-I be used for circular replication (A
> > <replicates> B <replicates> A)
> > or there is some kind of problem with locking or
> > anything else?
>
> Sounds like you want some kind of synchronous federated multi-master
> repication... which Slony-I wont do and I don't know of any system that will.
> You might be able to get some of that functionality using views and multiple
> replication sets, but that conversation really ought to take place on a more
> appropriate list, like the Slony list for example.

I had to do multi-master replication for a major project and we wound
up writing our own replication system. The problem is that this sort of
thing really has to be based on your own business rules. There is no
way to make it generic. At least, that was the conclusion we came to.

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.


From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org, bmihajlov(at)yahoo(dot)com
Subject: Re: Slony-I for circular replication
Date: 2006-03-31 15:35:31
Message-ID: 20060331153531.GM49405@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 30, 2006 at 10:15:21AM -0500, D'Arcy J.M. Cain wrote:
> I had to do multi-master replication for a major project and we wound
> up writing our own replication system. The problem is that this sort of
> thing really has to be based on your own business rules. There is no
> way to make it generic. At least, that was the conclusion we came to.

Maybe true, but certainly a lot of the framework should be generic, no?

There's *a lot* of people who ask about multi-master replication.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461


From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: xzilla(at)users(dot)sourceforge(dot)net, pgsql-hackers(at)postgresql(dot)org, bmihajlov(at)yahoo(dot)com
Subject: Re: Slony-I for circular replication
Date: 2006-03-31 16:18:27
Message-ID: 20060331111827.2dacf699.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 31 Mar 2006 09:35:31 -0600
"Jim C. Nasby" <jnasby(at)pervasive(dot)com> wrote:
> On Thu, Mar 30, 2006 at 10:15:21AM -0500, D'Arcy J.M. Cain wrote:
> > I had to do multi-master replication for a major project and we wound
> > up writing our own replication system. The problem is that this sort of
> > thing really has to be based on your own business rules. There is no
> > way to make it generic. At least, that was the conclusion we came to.
>
> Maybe true, but certainly a lot of the framework should be generic, no?

Possibly. Unfortunately I did the work under NDA. I should check and
see how much I can talk about. I may at least be able to present a
paper discussing the basic ideas. Hmm. Maybe for the Toronto
conference?

> There's *a lot* of people who ask about multi-master replication.

Yah, we were one of them. :-)

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.


From: "Gustavo Tonini" <gustavotonini(at)gmail(dot)com>
To: "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slony-I for circular replication
Date: 2006-04-01 19:14:23
Message-ID: 9c31dd0d0604011114h4c90ffecsf38a1f9c6645a857@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Ozsu show us some solution for the problem in the book "Principles of
distributed database systems".

On 4/1/06, D'Arcy J.M. Cain <darcy(at)druid(dot)net> wrote:
> On Fri, 31 Mar 2006 17:57:25 -0300
> "Gustavo Tonini" <gustavotonini(at)gmail(dot)com> wrote:
> > why there's no way to make multi-master replication generic?
>
> Well, that's the material for a paper but the simplest example I can
> suggest is serial. How do multiple machines insert into a database
> table with a sequential primary key?
>
> --
> D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
> http://www.druid.net/darcy/ | and a sheep voting on
> +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
>


From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Slony-I for circular replication
Date: 2006-04-02 02:30:06
Message-ID: 87ek0gaevl.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

The world rejoiced as gustavotonini(at)gmail(dot)com ("Gustavo Tonini") wrote:
> Ozsu show us some solution for the problem in the book "Principles of
> distributed database systems".

Would it be "telling" to outline some of the solutions he suggests?
--
(format nil "~S(at)~S" "cbbrowne" "gmail.com")
http://linuxdatabases.info/info/slony.html
Rules of the Evil Overlord #189. "I will never tell the hero "Yes I
was the one who did it, but you'll never be able to prove it to that
incompetent old fool." Chances are, that incompetent old fool is
standing behind the curtain." <http://www.eviloverlord.com/>


From: "Gustavo Tonini" <gustavotonini(at)gmail(dot)com>
To: "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slony-I for circular replication
Date: 2006-04-02 20:01:20
Message-ID: 9c31dd0d0604021301s956529eyaaf3e5035e9775f7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

The isbn is 0-13-659707-6. I'm very interesting in study (and
implement) a generic framework for replication in a project of the
university.

Gustavo.

On 4/1/06, Guido Barosio <gbarosio(at)gmail(dot)com> wrote:
> Heya,
>
> Do you have the isbn of the book? Would be great.
>
> Cheers,
> G.-
>
> On 4/1/06, Gustavo Tonini <gustavotonini(at)gmail(dot)com> wrote:
> > Ozsu show us some solution for the problem in the book "Principles of
> > distributed database systems".
> >
> > On 4/1/06, D'Arcy J.M. Cain <darcy(at)druid(dot)net> wrote:
> > > On Fri, 31 Mar 2006 17:57:25 -0300
> > > "Gustavo Tonini" <gustavotonini(at)gmail(dot)com> wrote:
> > > > why there's no way to make multi-master replication generic?
> > >
> > > Well, that's the material for a paper but the simplest example I can
> > > suggest is serial. How do multiple machines insert into a database
> > > table with a sequential primary key?
> > >
> > > --
> > > D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
> > > http://www.druid.net/darcy/ | and a sheep voting on
> > > +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
> > >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > choose an index scan if your joining column's datatypes do not
> > match
> >
>
>
> --
> Guido Barosio
> -----------------------
>