Re: Basic subtransaction facility

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Basic subtransaction facility
Date: 2004-04-18 00:41:23
Message-ID: 20040418004123.GD3546@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Sat, Apr 17, 2004 at 10:03:40AM -0400, Bruce Momjian wrote:

> Do you want this applied?

If you want. When not #defined, the behavior is the same as the current
code, so it shouldn't affect anything. However I posted mainly so
people could comment on the modifications, and maybe Heikki Linnakangas
could see how it affects his two phase commit patch.

Also, that code does not change a lot, so there's little risk of code
drift to worry about; this makes it unlikely that I'd have a lot of work
to do to update it to a future CVS tip.

But maybe applying it means it gets more testing.

> ---------------------------------------------------------------------------
>
> Alvaro Herrera wrote:
> > Hackers,
> >
> > Here is a very preliminar patch that allows the user to say "BEGIN"
> > inside a transaction and have the system react accordingly. This is
> > only a modification to xact.c (and slightly to other places to allow it
> > to work); the important functions are empty.
> >
> > It compiles fine for me with both SUBTRANSACTIONS defined and not
> > defined; when not defined, the behavior is the same as the current code.
> > Please note that I have made some errors more fatal than they are now,
> > as bugs in this code will have much worse effects than a flaw in the
> > current transaction system.
> >
> > One quick note: there are two ENDABORT states for a subtransaction,
> > SUBENDABORT_OK and SUBENDABORT_ERROR. They signal whether the parent
> > transaction should be aborted after the child transaction finishes or
> > not: an aborted subtransaction where the user issues COMMIT should
> > abort the parent transaction; if the user issues ROLLBACK, the parent
> > can be allowed to continue.
> >
> >
> > Please have a look and comment. This file does not move a lot so I
> > don't think it will suffer from a lot of code drift.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"At least to kernel hackers, who really are human, despite occasional
rumors to the contrary" (LWN.net)

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Fabien COELHO 2004-04-18 09:42:50 guc variables flags explicitly initialisation
Previous Message Fabien COELHO 2004-04-17 17:35:57 'information_schema' considered a system schema