Re: 2-phase commit - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: 2-phase commit
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4962022@m0114.s-mxs.net
Whole thread Raw
In response to 2-phase commit  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-hackers
> > >         Master          Slave
> > >         ------          -----
> > >         commit ready-->
> > >                         <--OK
> > >         commit done->XX
> > >
> > > is the "commit done" message needed ?
> >
> > Of course ... how else will the Slave commit?  From my
> understanding, the
> > concept is that the master sends a commit ready to the
> slave, but the OK
> > back is that "OK, I'm ready to commit whenever you are", at
> which point
> > the master does its commit and tells the slave to do its ...
>
> Or the slave could reject the request.

At this point only because of a hardware error. In case of network
problems the "commit done" eighter did not reach the slave or the "success"
answer did not reach the master.

That is what it's all about. Phase 2 is supposed to be low overhead and very
fast to allow keeping the time window for failure (that produces in-doubt
transactions) as short as possible.

Andreas


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: 2-phase commit
Next
From: Bruce Momjian
Date:
Subject: Re: 2-phase commit