Re: Two-phase commit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Two-phase commit
Date: 2004-10-06 23:07:37
Message-ID: 1299.1097104057@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> Tom Lane wrote:
>> Well, the question is how long must the individual databases retain
>> state with which to answer "recover" requests.

> As I understand it, you don't need to keep state for committed txns,

I think that's clearly wrong:

TM --> DB: COMMIT PREPARED foo

DB does it and forgets gid foo

TM crashes and restarts

TM --> DB: what's the state of foo?

DB --> TM: go away, never heard of it

I suppose you could code the TM to treat this as meaning "it was
committed" but I think the folly of that is obvious.

> Probably the next question is, do we want a database-side timeout on how
> long prepared txns can stay alive before being summarily rolled back?

Yeah, there's another set of issues there. Personally I always thought
that 2PC was a fundamentally broken concept, because it's got so many
squirrelly cases where the guarantees you thought you were buying with
all this overhead vanish into thin air.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-10-06 23:33:11 Re: Two-phase commit
Previous Message Rod Taylor 2004-10-06 23:06:52 Re: Two-phase commit

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-10-06 23:33:11 Re: Two-phase commit
Previous Message Rod Taylor 2004-10-06 23:06:52 Re: Two-phase commit