Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 20040702015602.GA17121@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Mike Benoit <ipso@snappymail.ca>)
Список pgsql-hackers
On Thu, Jul 01, 2004 at 04:47:09PM -0700, Mike Benoit wrote:
> On Thu, 2004-07-01 at 18:38 -0400, Alvaro Herrera wrote:
> > On Thu, Jul 01, 2004 at 02:01:37PM -0500, Thomas Swan wrote:

> > If we change the syntax, say by using SUBCOMMIT/SUBABORT for
> > subtransactions, then using a simple ABORT would abort the whole
> > transaction tree.
> 
> But then we're back to the application having to know if its in a
> regular transaction or a sub-transaction aren't we? To me that sounds
> just as bad. 

I don't get it.  You want to argue that the application should be
ignorant of whether it was in a transaction or not?

What I am saying is that independent of what the current nesting level
is, issuing ABORT would close all open subtransactions, close (roll
back) the main transaction too, and return to the default
not-in-a-transaction state.

Of course, issuing a single COMMIT would also commit all open
subtransactions and the main transaction too.

In contrast, issuing SUBCOMMIT or SUBABORT would commit/abort only the
current subtransaction.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ellos andaban todos desnudos como su madre los parió, y también las mujeres,
aunque no vi más que una, harto moza, y todos los que yo vi eran todos
mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Quick question regarding tablespaces
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Adding column comment to information_schema.columns