Re: [PATCHES] nested xacts and phantom Xids

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] nested xacts and phantom Xids
Date: 2004-06-26 04:49:11
Message-ID: 20040626044911.GC1865@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sat, Jun 26, 2004 at 12:42:28AM -0400, Alvaro Herrera wrote:

> - discussion whether we want a different syntax for subxacts, like
> SUBBEGIN/SUBCOMMIT/SUBABORT instead of BEGIN/COMMIT/ABORT. Please
> comment on this point.

It has been suggested a couple of times that we should use a different
syntax for subtransactions than for main transactions. This would for
example allow things like

BEGIN;
do something;
SUBBEGIN;
do something else;
SUBBEGIN;
do more things;
...
COMMIT;

And issue a single COMMIT (or ROLLBACK) to get rid of the whole thing.
(This is suspiciously similar to SAVEPOINTs). Another nice idea would
be to be able to name subtransactions and rollback to a name, which
would bring savepoints even nearer. Also maybe a subcommit <name> would
commit everything within that name (not sure if this is a good idea).

Please comment.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Este mail se entrega garantizadamente 100% libre de sarcasmo.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2004-06-26 05:26:38 Re: [PATCHES] nested xacts and phantom Xids
Previous Message Alvaro Herrera 2004-06-26 04:42:28 Re: nested xacts and phantom Xids

Browse pgsql-patches by date

  From Date Subject
Next Message Dennis Bjorklund 2004-06-26 05:26:38 Re: [PATCHES] nested xacts and phantom Xids
Previous Message Alvaro Herrera 2004-06-26 04:42:28 Re: nested xacts and phantom Xids