Re: 2-phase commit

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 2-phase commit
Date: 2003-09-29 16:43:46
Message-ID: 200309291643.h8TGhkt29074@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Marc G. Fournier wrote:
> >>> Or the slave could reject the request.
> >>
> >> Huh? The slave has that option?? In what circumstance?
>
> > I thought the slave could reject if someone local already had the row
> > locked.
>
> All normal reasons for transaction failure are supposed to be checked
> for before the slave responds that it's ready to commit. Otherwise it's
> supposed to say it can't commit.
>
> Basically the weak spot of 2PC is that it assumes there are no possible
> reasons for failure after "ready to commit" is sent. You can make that
> approximately true, with sufficient investment of resources, but it's
> definitely not a pleasant assumption.

Yep. There is no full solution. I think it is like running with fsync
off --- if the OS crashes, you have to clean up --- if you fail on a
2-phase commit, you have to clean up. Multi-master will be the same.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-09-29 16:45:14 Re: more i18n/l10n issues
Previous Message Andrew Sullivan 2003-09-29 16:42:33 Re: 2-phase commit