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) ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org