From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Unified logging system for command-line programs
Date: Thu, 3 Jan 2019 19:54:28 +0100
Message-ID: <a7c07b9c-8aa4-f9bb-e9eb-30111b732645@2ndquadrant.com> (raw)
In-Reply-To: <20190103180315.o4gh3id5quh5aebc@alap3.anarazel.de>
References: <6a609b43-4f57-7348-6480-bd022f924310@2ndquadrant.com>
<21141.1546199123@sss.pgh.pa.us>
<20181231155557.7mokxwg7fnvoxd4a@alap3.anarazel.de>
<841dd9fb-3550-dce0-e9ff-8f64cac9f15d@2ndquadrant.com>
<20190103180315.o4gh3id5quh5aebc@alap3.anarazel.de>
On 03/01/2019 19:03, Andres Freund wrote:
>> My goal was to make logging smaller and more
>> compact. Two, I think tying error reporting to flow control does not
>> always work well and leads to bad code and a bad user experience.
>
> Not sure I can buy that, given that we seem to be doing quite OK in the backend.
Consider the numerous places where we do elog(LOG) for an *error*
because we don't want to jump away.
>> Relatedly, rewriting all the frontend programs to exception style would
>> end up being a 10x project to rewrite everything for no particular
>> benefit. Going from 8 or so APIs to 2 is already an improvement, I
>> think. If someone wants to try going further, it can be considered, but
>> it would be an entirely different project.
>
> Why would it be 10x the effort,
Because you would have to rewrite all the programs to handle elog(ERROR)
jumping somewhere else.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: Unified logging system for command-line programs
In-Reply-To: <a7c07b9c-8aa4-f9bb-e9eb-30111b732645@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox