Re: What are nested transactions then? was Nested transaction workaround? - Mailing list pgsql-general

From Richard Huxton
Subject Re: What are nested transactions then? was Nested transaction workaround?
Date
Msg-id 200401141149.52041.dev@archonet.com
Whole thread Raw
In response to What are nested transactions then? was Nested transaction workaround?  ("Chris Travers" <chris@travelamericas.com>)
List pgsql-general
On Wednesday 14 January 2004 09:45, Chris Travers wrote:
> From: "Martijn van Oosterhout" <kleptog@svana.org>
>
> > Well, actually, the problem appears to be that people want to be able to
> > roll back each individual statement without killing the parent
>
> transaction,
>
> > and they want to make this the default behaviour. This takes it out of
> > the "never used" category to "everybody does it" category.
>
> Ok.  Now I am confused.  I thought that a nested transaction would involve
> two features:
> 1:  The ability to incrimentally commit/rollback changes, i.e. at certain
> points in the transaction have a sub-commit.
> 2:  The ability to have a transaction within another transaction with
> transactional visibility rules applying within the transaction tree.

Of course you can do #1 with #2.

> What exactly do you mean by roll back individual statements?  What exactly
> would be the default behavior?

I think we're talking about the "insert and if that fails update" sequence
that seems to be a common approach.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Huge Data
Next
From: Martijn van Oosterhout
Date:
Subject: Re: What are nested transactions then? was Nested transaction workaround?