Re: Nested Transactions, Abort All

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: josh(at)agliodbs(dot)com, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Oliver Jowett <oliver(at)opencloud(dot)com>, Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Simon Riggs <simon(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-11 05:40:17
Message-ID: Pine.LNX.4.44.0407110729500.2838-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 10 Jul 2004, Bruce Momjian wrote:

> Oracle can use SAVEPOINTS all the time because it knows it is always in
> a transaction, but PostgreSQL is not always.

PostgreSQL is also alsways in a transaction. If some use autocommit and go

SAVEPOINT foo;

RELEASE foo;

The first will work and that transaction will end. Then the next is in a
new transaction and will fail with an error saying that foo does not
exist. That's how it should be.

If people don't like or understand autocommit they should not use it.
This is especially true in other cases where people do updates that really
must be in a single transaction.

Your idea is that if we use nested BEGIN/COMMIT one can always issue these
even if one does not know if one have done BEGIN before or not. To me this
is a problem with autocommit that is solved by not using autocommit. I
don't think this is a problem we should solve.

--
/Dennis Björklund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2004-07-11 14:01:09 Re: [BUGS] BUG #1118: Misleading Commit message
Previous Message Alvaro Herrera 2004-07-11 05:05:47 Re: plperl (7.5)