Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Morten Hustveit <morten(at)eventures(dot)vc>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date: 2013-11-20 15:16:00
Message-ID: 20131120151600.GA2827@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 20, 2013 at 10:04:22AM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Tue, Nov 19, 2013 at 10:21:47PM -0500, Tom Lane wrote:
> >> My personal standpoint is that I don't care much whether these messages
> >> are NOTICE or WARNING. What I'm not happy about is promoting cases that
> >> have been non-error conditions for years into ERRORs.
>
> > I don't remember any cases where that was suggested.
>
> Apparently you've forgotten the commit that was the subject of this
> thread. You took a bunch of SET cases that we've always accepted
> without any complaint whatsoever, and made them into ERRORs, thereby
> breaking any applications that might've expected such usage to be
> harmless. I would be okay if that patch had issued WARNINGs, which
> as you can see from the thread title was the original suggestion.

Oh, those changes. I thought we were just looking at _additional_
changes.

> > The attached patch changes ABORT from NOTICE to WARNING, and documents
> > that all other are errors. This "top-level" logic idea came from Robert
> > Haas, and it has some level of consistency.
>
> This patch utterly fails to address my complaint.
>
> More to the point, I think it's a waste of time to make these sorts of
> adjustments. The only thanks you're likely to get for it is complaints
> about cross-version behavioral changes. Also, you're totally ignoring
> the thought that these different message levels might've been selected
> intentionally, back when the code was written. Since there have been
> no field complaints about the inconsistency, what's your hurry to
> change it? See Emerson.

My problem was that they issued _no_ message at all. I am fine with
them issuing a warning if that's what people prefer. As they are all
SET commands, they will be consistent.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-11-20 15:21:30 Re: Shave a few instructions from child-process startup sequence
Previous Message Andres Freund 2013-11-20 15:15:46 Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1