From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: subtransactions -- storage manager |
Date: | 2004-04-30 07:00:42 |
Message-ID: | 1083308441.3100.331.camel@stromboli |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Natoli | 2004-04-30 08:00:07 | Re: FW: Timezone library |
Previous Message | Simon Riggs | 2004-04-30 06:59:11 | Re: PITR Phase 1 - Full set of patches |