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

From Tom Lane
Subject Re: Frontend error logging style
Date
Msg-id 3949909.1649444725@sss.pgh.pa.us
Whole thread Raw
In response to Re: Frontend error logging style  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Frontend error logging style  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
> On 30 Mar 2022, at 00:38, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Feel free to work on a followup editing patch though.

> Thats my plan, once this lands I'll rebase the comments on top of your work and
> we can have a separate discussion around them then.

The main patch is pushed now.  I addressed the complaint Peter had
about the messages with "Check your installation" pseudo-hints
by getting rid of them; I concur with your observation that those
hints were basically useless.  I also fixed the one place where the
message should clearly be "could not close" not "could not write".
Mostly didn't yield to temptation anywhere else.

One other loose end is bothering me: I stuck with logging.h's
original choice to put "if (likely())" or "if (unlikely())"
conditionals into the macros, but I rather suspect that that's
just a waste.  I think we should put a centralized level check
into logging.c, and get rid of at least the "if (likely())"
checks, because those are going to succeed approximately 100.0%
of the time.  Maybe there's an argument for keeping the unlikely()
ones.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Lowering the ever-growing heap->pd_lower
Next
From: Peter Geoghegan
Date:
Subject: Re: Lowering the ever-growing heap->pd_lower