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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Basic subtransaction facility
Date: 2004-04-27 20:21:26
Message-ID: 20040427202126.GA4205@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Mon, Apr 26, 2004 at 11:30:16PM -0400, Bruce Momjian wrote:
>
> Alvaro, where are we on this patch. I think the suggestion was to
> throw FATAL rather than add a new error level.
>
> Is this ready to be applied?

I forgot to verify if it worked correctly with #undef SUBTRANSACTIONS
--- it didn't. This version does. This patch includes both patches I
posted and a few more changes, and does the following:

- adds subtransaction state knowledge to xact.c
- adds subtransaction support to smgr, portals (cursors) and async notifies.
- adds a new memory context related to the subxact tree (is reset only
on subtrans abort).
- corrects a couple of bugs in the previous patches.
- mantains a Xid list of committed subxacts, for use in future changes
involving pg_clog
- adds support for executing BEGIN inside an aborted transaction,
not only as a simple query (1st patch did this) but also as messages
of v3 protocol and prepared statements.
- works cleanly with SUBTRANSACTIONS undefined (you get the current
behavior, no BEGIN is allowed inside a running transaction) and
defined (all of the above).
- keeps the original behavior of using FATAL whenever an bug is found
inside xact.c

I feel this one is ready to be applied. Tom wanted to review it, of
course.

Still missing:
- deal with prepared statements, deferred triggers
- save state in pg_clog
- visibility rules

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La realidad se compone de muchos sueños, todos ellos diferentes,
pero en cierto aspecto, parecidos..." (Yo, hablando de sueños eróticos)

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-04-27 20:22:43 Re: Basic subtransaction facility
Previous Message Bruce Momjian 2004-04-27 19:50:53 Thread test improvement