Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path
Date: 2020-09-10 14:02:14
Message-ID: 693d784b-d82a-3168-58a3-c1e9f428bfdb@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-09-06 02:24, David Rowley wrote:
>> I would add DEBUG1 back into the conditional, like
>>
>> if (__builtin_constant_p(elevel) && ((elevel) >= ERROR || (elevel) <=
>> DEBUG1) ? \
>
> hmm, but surely we don't want to move all code that's in the same
> branch as an elog(DEBUG1) call into a cold area.

Yeah, nevermind that.

> The v3 patch just put an unlikely() around the errstart() call if the
> level was <= DEBUG1. That just to move the code that's inside the if
> (errstart(...)) in the macro into a cold area.

That could be useful. Depends on how much effect it has.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-09-10 14:04:31 Re: [PATCH] Missing links between system catalog documentation pages
Previous Message Peter Eisentraut 2020-09-10 14:00:47 Re: Missing "Up" navigation link between parts and doc root?