Re: [PATCHES] nested xacts and phantom Xids - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [PATCHES] nested xacts and phantom Xids
Date
Msg-id 20040626044911.GC1865@dcc.uchile.cl
Whole thread Raw
Responses Re: [PATCHES] nested xacts and phantom Xids
Re: [PATCHES] nested xacts and phantom Xids
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [COMMITTERS] pgsql-server: Support renaming of tablespaces,
Next
From: Dennis Bjorklund
Date:
Subject: Re: [PATCHES] nested xacts and phantom Xids