From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: XLog: how to log? |
Date: | 2004-05-11 22:29:33 |
Message-ID: | 20040511222933.GA6042@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-11 23:03:39 | Re: XLog: how to log? |
Previous Message | Tom Lane | 2004-05-11 22:19:12 | Re: XLog: how to log? |