Re: BEGIN inside transaction should be an error - Mailing list pgsql-hackers

From Tommi Maekitalo
Subject Re: BEGIN inside transaction should be an error
Date
Msg-id 200605110805.57392.t.maekitalo@epgmbh.de
Whole thread Raw
In response to Re: BEGIN inside transaction should be an error  (Mark Dilger <pgsql@markdilger.com>)
Responses Re: BEGIN inside transaction should be an error
List pgsql-hackers
Am Mittwoch, 10. Mai 2006 22:23 schrieb Mark Dilger:
> Martijn van Oosterhout wrote:
> > On Wed, May 10, 2006 at 09:41:46AM +0200, Mario Weilguni wrote:
> >>>>Could we make BEGIN fail when we already are in a transaction?
...
>
> Or if you really want to screw things up, you could require COMMIT; COMMIT;
> to finish off the transaction started by BEGIN; BEGIN;  We could just
> silently keep the transaction alive after the first COMMIT;  ;)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

I would expect after a COMMIT without an error, that my transaction is 
committed. When the system accidently issued a second BEGIN, this would not 
be the case.

And what about BEGIN; BEGIN; ROLLBACK; COMMIT; then? Should the rollback be 
ignored also?

I'd vote for breaking broken applications and leave the database-administrator 
reactivate this currently broken behavior of postgresql via GUC.

Tommi


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Warning -- PostgreSQL Anniversary Cutoff Approaching
Next
From: Martijn van Oosterhout
Date:
Subject: Re: .pgpass file and unix domain sockets