Re: Inconsistency in plpgsql's error context reports

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistency in plpgsql's error context reports
Date: 2017-12-11 17:40:55
Message-ID: CA+TgmoYkeOcbg415LURWXmM-GdpRzvkM_sOjmL-C1-Cxz9RjWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 10, 2017 at 11:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> There seem to be two ways we could look at this. One is that the
> new test case just needs to be rejiggered to avoid unstable output
> ("\set VERBOSITY terse" would be the easiest way). But there is
> also room to argue that it's bad that plpgsql produces error reports
> that vary depending on the phase of the moon, which is pretty much
> what this would look like in the field --- cache flushes will occur
> unpredictably in most application environments.

I am inclined toward the latter view. I think predictability is very
important and that lack of predictability is both frustrating for
users and a sign of poor programming practices under the hood. Nobody
likes clicking on the same thing twice and getting a different result
each time; as humans, we want to feel like we understand how things
work, and if they work differently at different times, we tend to
either question whether we understand them or question whether they
are actually robust systems. For example, lately my car has started
to take a variable number of gallons of gasoline to fill the tank from
almost-empty to completely full. I find that rather unnerving: how do
I know whether I'm going to run out of gas? Similarly here -- I'm not
sure whether people want that extra CONTEXT line or not, but I think
they're going to want to either get it or not get it consistently. If
not, they'll tend to feel like something is flaky.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-12-11 17:41:05 Re: [HACKERS] Custom compression methods
Previous Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2017-12-11 17:39:48 Re: Rethinking MemoryContext creation