Re: Nested Transactions, Abort All - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Nested Transactions, Abort All
Date
Msg-id 200407111507.50444.josh@agliodbs.com
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Bruce Momjian <pgman@candle.pha.pa.us>)
List 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 BerkusAglio Database SolutionsSan Francisco



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Nested Transactions, Abort All
Next
From: Josh Berkus
Date:
Subject: Re: Nested Transactions, Abort All