Re: XLog: how to log? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: XLog: how to log?
Date
Msg-id 20040511222933.GA6042@dcc.uchile.cl
Whole thread Raw
In response to Re: XLog: how to log?  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On Tue, May 11, 2004 at 11:07:47PM +0100, Simon Riggs wrote:

> On Tue, 2004-05-11 at 22:26, Alvaro Herrera wrote:

> > Right.  What I was saying is that we don't need pg_subtrans info,
> > because that's only needed while the subtransaction is marked as
> > "subcommitted" but it's parent hasn't committed or aborted yet.  The
> > subcommitted status is changed to committed/aborted when the main
> > transaction commits or aborts; at recovery time, we already know if that
> > happenned or not so we can mark it right away.
> 
> Maybe I'm just not following you, which seems likely.
> 
> Surely it is possible that a subtrans could abort, yet the fulltrans
> commits. Yet that doesn't in any way imply that the subtrans should
> change from aborted to committed?

The subtransaction will be recorded as aborted in pg_clog (I mean there
will be a XLog record saying that it aborted).  That protects it from
showing as committed, no matter what happens to the parent xact.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La tristeza es un muro entre dos jardines" (Khalil Gibran)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: XLog: how to log?
Next
From: Tom Lane
Date:
Subject: Re: XLog: how to log?