Re: Frontend error logging style - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Frontend error logging style
Date
Msg-id 906958.1649789773@sss.pgh.pa.us
Whole thread Raw
In response to Re: Frontend error logging style  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 11.04.22 17:22, Tom Lane wrote:
>> The patch I presented keeps the unlikely() checks in the debug-level
>> macros.  Do you think we should drop those too?  I figured that avoiding
>> evaluating the arguments would be worth something.

> Oh, that's right, the whole thing is to not evaluate the arguments if 
> the log level isn't adequate.  We should probably keep that.

I don't think that's nearly as interesting in the frontend as in
the backend.  Error messages in the backend frequently include
catalog lookups and the like in the arguments, but I think nearly
all frontend messages are writing nothing more complicated than
variables and maybe some indirections or array fetches.  So I'm
not all that worried about runtime, and would rather save some
code space.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: failures in t/031_recovery_conflict.pl on CI
Next
From: Tom Lane
Date:
Subject: Re: failures in t/031_recovery_conflict.pl on CI