Re: autonomous transactions

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: autonomous transactions
Дата
Msg-id 20080125062740.GM37748@decibel.org
обсуждение исходный текст
Ответ на Re: autonomous transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: autonomous transactions  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
Re: autonomous transactions  (Hans-Juergen Schoenig <postgres@cybertec.at>)
Список pgsql-hackers
On Wed, Jan 23, 2008 at 05:50:02PM -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> >> From looking at how Oracle does them, autonomous transactions are
> >> completely independent of the transaction that originates them -- they
> >> take a new database snapshot. This means that uncommitted changes in the
> >> originating transaction are not visible to the autonomous transaction.
>
> > Oh! Recursion depth would need to be tested for as well. Nasty.
>
> Seems like the cloning-a-session idea would be a possible implementation
> path for these too.

Oracle has a feature where you can effectively save a session and return
to it. For example, if filling out a multi-page web form, you could save
state in the database between those calls. I'm assuming that they use
that capability for their autonomous transactions; save the current
session to the stack, clone it, run the autonomous transaction, then
restore the saved one.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: [PATCHES] Better default_statistics_target
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: [PATCHES] Friendly help for psql