Re: Nested Transactions, Abort All

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-09 18:41:42
Message-ID: 1089398502.17493.571.camel@stromboli
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2004-07-09 at 11:45, Andreas Pflug wrote:
> Simon Riggs wrote:
>
> >ISTM - my summary would be
> >1. We seem to agree we should support SAVEPOINTs
> >
> >2. We seem to agree that BEGIN/COMMIT should stay unchanged...
> >
> >
> >
> >>With savepoints, it looks pretty strange:
> >>
> >>BEGIN;
> >> SAVEPOINT x1;
> >> INSERT INTO ...;
> >> SAVEPOINT x2;
> >> INSERT INTO ...;
> >> SAVEPOINT x3;
> >> INSERT INTO ...;
> >>
> >>
> >>
> >
> >This isn't how you would use SAVEPOINTs...look at this...
> >
> >BEGIN
> > display one screen to user - book the flight
> > INSERT INTO ...
> > INSERT INTO ...
> > UPDATE ...
> > SAVEPOINT
> > display another related screen - book the hotel
> > INSERT INTO
> > DELETE
> > UPDATE
> > UPDATE
> > SAVEPOINT
> > offer confirmation screen
> >COMMIT (or ROLLBACK)
> >
> >
>
> No, SAVEPOINT is not some kind of intermediate commit, but a point where
> a rollback can rollback to.

Hmmm....I'm not sure what you mean by "No". The SAVEPOINT is somewhere
you can ROLLBACK to, yes - exactly what I'm saying.

I've not introduced any concept of "intermediate commit"...

Do you agree that my example is valid Oracle SQL?

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-07-09 18:56:05 Re: PITR Redo Create Database fails
Previous Message Christopher Kings-Lynne 2004-07-09 18:40:26 Re: pg_dump 7.4 bug