Re: Unified logging system for command-line programs - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unified logging system for command-line programs
Date
Msg-id a7c07b9c-8aa4-f9bb-e9eb-30111b732645@2ndquadrant.com
Whole thread Raw
In response to Re: Unified logging system for command-line programs  (Andres Freund <andres@anarazel.de>)
Responses Re: Unified logging system for command-line programs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: GiST VACUUM
Next
From: Jerry Sievers
Date:
Subject: Re: pg_upgrade: Pass -j down to vacuumdb