Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date
Msg-id 20131119181434.GP28149@momjian.us
Whole thread Raw
In response to Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Andres Freund <andres@2ndquadrant.com>)
Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Nov 19, 2013 at 07:12:32PM +0100, Andres Freund wrote:
> On 2013-11-19 13:09:16 -0500, Bruce Momjian wrote:
> > > Why change the historical behaviour for savepoints?
> > 
> > Because as Tom stated, we already do warnings for other useless
> > transaction commands like BEGIN WORK inside a transaction block:
> 
> Which imo is a bad, bad historical accident. I've repeatedly seen this
> hide bugs causing corrupted data in the end.
> 
> But even if that weren't a concern, the fact that BEGIN does it one way
> currently doesn't seem very indicative of changing other historical behaviour.

Look at this gem, which returns notice:
test=> ABORT;NOTICE:  there is no transaction in progressROLLBACKtest=>

We are all over the map on this!  The big question is whether we want to
add some sanity to this, or just leave it alone, and if we leave it
alone, what pattern do we use for the new checks?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Mike Blackwell
Date:
Subject: Re: stats for network traffic WIP
Next
From: Josh Berkus
Date:
Subject: Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1