Re: subtransactions -- storage manager - Mailing list pgsql-patches

From Simon Riggs
Subject Re: subtransactions -- storage manager
Date
Msg-id 1083308441.3100.331.camel@stromboli
Whole thread Raw
In response to Re: subtransactions -- storage manager  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: subtransactions -- storage manager  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Fri, 2004-04-30 at 01:02, Bruce Momjian wrote:
> Simon Riggs wrote:
> > On Sun, 2004-04-25 at 19:06, Alvaro Herrera wrote:
> > > Hackers,
> > >
> > > This patch adds subtransaction support into the storage manager.  Files
> > > created or dropped inside a subtransaction are correctly dealt with at
> > > subtransaction commit or abort.
> >
> > > - pg_clog/pg_subtrans.  Need a solution.
> > >
> > >
> > > PS: somehow I managed to get tired of the phrase "nested transactions"
> > > and I'm using the term "subtransactions" instead.  In my head they are
> > > the same thing ...
> >
> > Impressive.
> >
> > As you're aware, our current work overlaps.
> > pg_clog doesn't seem like the place to record subtransactions, though
> > maybe it is... could we not give subtransactions a txnid just as with
> > flat transactions? That way we can record everything in pg_clog AND
> > recovery will work without further modification - as long as the failure
> > of a top level transaction causes failure of every subtransaction EVEN
> > if the subtrans originally committed.
>
> The problem is we have to atomically mark multiple transactions as
> committed/aborted in pg_clog.  Each subtransaction does get its own xid,
> it is just that pg_subtrans maps each xid to is parent xid for use in
> atomically marking the xids as committed/aborted.
>
> Recovery via xlog should be fine.
>

Phewww!

> > If you add pg_subtrans, you will need to make recovery work all over
> > again...really, you don't want to be doing that, do you?
> >
> > I also have other questions....
> > Forgive my lack of attention: I want SAVEPOINTs, not subtransactions...
> > how do we do those?
>
> Savepoints are basically just a BEGIN at the save point, and a ROLLBACK
> to get you back to the saved spot.  It is just window-dressing on top of
> nested transactions.
>

OK, but is anybody working on the window dressing bit, so that we have
ANSI compliant commands?

Best Regards, Simon


pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: PITR Phase 1 - Full set of patches
Next
From: Claudio Natoli
Date:
Subject: Re: FW: Timezone library