Re: Nested Transactions, Abort All
От | Josh Berkus |
---|---|
Тема | Re: Nested Transactions, Abort All |
Дата | |
Msg-id | 200407111515.47151.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Nested Transactions, Abort All (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
Ответы |
Re: Nested Transactions, Abort All
|
Список | 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 beignored release; -- commands will be ignoredrelease; -- abort main xact 'cause we didn't rollback commit; -- abort message Is the above more or less correct, Alvaro? -- -Josh BerkusAglio Database SolutionsSan Francisco
В списке pgsql-hackers по дате отправления: