Re: [HACKERS] Database replication... - Mission Critica - Mailing list pgsql-general

From snpe
Subject Re: [HACKERS] Database replication... - Mission Critica
Date
Msg-id 200211071910.59739.snpe@snpe.co.yu
Whole thread Raw
List pgsql-general
On Thursday 07 November 2002 04:15 pm, darren@up.hrcoxmail.com wrote:
> > > This is wrong assumption. If
> > >
> > > 1st client executes UPDATE t SET a = 1 WHERE b = 2;
> > > 2nd client executes UPDATE t SET a = 2 WHERE b = 2;
> > >
> > > at "the same time" you don't know in what order these
> > > queries will be executed on two different servers (because
> > > you can't control what transaction will lock record(s)
> > > for update first).
> >
> > I guess we would need two phase commit in this case. Then it could be
> > guaranteed.
>
> I'm not sure 2PC would guarantee order here.  There is
> potential for a dead lock across system boundary in this
> example.  If the pre commit messages were sent at the same
> time which server would lock the resource?
>

Problem is same with 2 clients on one server

regards
Haris Peco


pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: Encrypted Database?
Next
From: Tom Lane
Date:
Subject: Re: database design with timestamp