From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Nested Transactions, Abort All |
Date: | 2004-07-11 22:15:46 |
Message-ID: | 200407111515.47151.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro,
> I have a better question: do we allow SAVEPOINT (i.e. to establish a
> savepoint, i.e. to open a nested transaction) within an aborted
> transaction block?
My opinion? No. I would personally not want to allow it.
> My opinion is that we should disallow both SAVEPOINT and RELEASE when in
> an aborted transaction block. Only ROLLBACK TO, ROLLBACK and COMMIT
> would be allowed.
I agree.
> In this scenario, ROLLBACK TO would always return to
> a non-aborted transaction state, or the target savepoint would not
> exist and the state would remain the same.
This is also good.
From my perspective, as a builder of some *very* database-centric
applications, if one has an abort contidition that proceeds to try to
establish a Savepoint as if the abort didn't exist then one needs to do some
debugging. I'm sorry I missed the original discussion on this or I would
have expressed this opinion earlier.
For that matter:
begin;
savepoint;
select 0/0; -- abort
savepoint; -- commands will be ignored
select 1; -- commands will be ignored
release; -- commands will be ignored
release; -- abort main xact 'cause we didn't rollback
commit; -- abort message
Is the above more or less correct, Alvaro?
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2004-07-11 22:25:46 | Re: Nested Transactions, Abort All |
Previous Message | Josh Berkus | 2004-07-11 22:07:50 | Re: Nested Transactions, Abort All |