Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group