Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 1089403200.17493.636.camel@stromboli
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Nested Transactions, Abort All
Список pgsql-hackers
On Fri, 2004-07-09 at 20:34, Bruce Momjian wrote:
> Alvaro Herrera wrote:
> > On Fri, Jul 09, 2004 at 09:07:58PM +0200, Dennis Bjorklund wrote:
> > > On Fri, 9 Jul 2004, Alvaro Herrera wrote:
> > > 
> > > > Clearly savepoints do not allow for a snapshot to be released; nested
> > > > xacts do.
> > > 
> > > Why not?
> > 
> > What is it?
> 
> Simon posted it.  It is called RELEASE:
> 
> > BEGIN;
> >       SAVEPOINT x1;
> >       INSERT INTO ...;
> >       RELEASE SAVEPOINT x1;
> >       SAVEPOINT x1;
> >       INSERT INTO ...;
> >       RELEASE SAVEPOINT x1;
> >       SAVEPOINT x1;
> >       INSERT INTO ...;
> >       RELEASE SAVEPOINT x1;

Yes, this is the DB2 and SQLAnywhere syntax.

Oracle uses ROLLBACK TO SAVEPOINT...identical pretty much.
Oracle's support of autonomous transactions looks to be identical to
nested transactions (Alvaro's advice required there...). They don't
allow you to explicitly call them, but you can use BEGIN/COMMIT in a
host program that calls a stored procedure, which also contains
BEGIN/COMMIT, effectively giving nested txns.

(...hopefully clearing up any discussion on "intermediate commits"
whoever mentioned those...)

Best regards, Simon Riggs



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_dump 7.4 bug
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Nested Transactions, Abort All