Re: Nested Transactions, Abort All

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org, elein <elein(at)varlena(dot)com>
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-11 22:07:50
Message-ID: 200407111507.50444.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce,

> Do we want to allow BEGIN NESTED to start a main transaction? Oracle
> can use SAVEPOINTS all the time because it knows it is always in a
> transaction, but PostgreSQL is not always. I don't see a downside to
> allowing it. COMMIT will still commit the entire transaction, of
> course.

Hmmm. I can see where this could cause trouble, allowing users and
developers to be unclear about whether or not they are in an explicit
transaction and thus leading to significant debugging issues. So I'm not
keen on, it, no.

What's the benefit? Elein?

And before you start the "function" argument: due to function autocommit, a
function is automatically part of a main implict transaction. So functions
are a non-argument as they will *always* be using NESTED/SAVEPOINT. This
would only become a concern if we started supporting non-transactional stored
procedures (ala Sybase) which nobody has even discussed working on.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2004-07-11 22:15:46 Re: Nested Transactions, Abort All
Previous Message Josh Berkus 2004-07-11 22:01:29 Re: Nested Transactions, Abort All