Re: 2-phase commit

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Andrew Sullivan" <andrew(at)libertyrms(dot)info>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 2-phase commit
Date: 2003-09-29 13:38:56
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4962020@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > > > The simplest senario(though there could be varations) is
> > >
> > > > [At participant(master)'s side]
> > > > Because the commit operations is done, does nothing.
> > >
> > > > [At coordinator(slave)' side]
> > > > 1) After a while
> > > > 2) re-establish the communication path between the
> > > > partcipant(master)'s TM.
> > > > 3) resend the "commit requeset" to the participant's TM.
> > > > 1)2)3) would be repeated until the coordinator receives
> > > > the "commit ok" message from the partcipant.
> > >
> > > [ scratches head ] I think you are using the terms "master" and "slave"
> > > oppositely than I would.
> >
> > Oops my mistake, sorry.
> > But is it 2-phase commit protocol in the first place ?
>
> That is, in your exmaple below
>
> Example:
>
> Master Slave
> ------ -----
> commit ready-->

This is the commit for phase 1. This commit is allowed to return all
sorts of errors, like violated deferred checks, out of diskspace, ...

> <--OK
> commit done->XX

This is commit for phase 2, the slave *must* answer with "success"
in all but hardware failure cases. (Note that instead the master could
instead send rollback, e.g. because some other slave aborted)

> is the "commit done" message needed ?

So, yes this is needed.

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-09-29 13:47:43 Re: pg_get_ruledef and extra line breaks
Previous Message Bruno Wolff III 2003-09-29 13:20:07 Re: pg_dump bug in 7.4