Re: Excessive CPU usage in StandbyReleaseLocks() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Excessive CPU usage in StandbyReleaseLocks()
Date
Msg-id 30018.1529430298@sss.pgh.pa.us
Whole thread Raw
In response to Re: Excessive CPU usage in StandbyReleaseLocks()  (Andres Freund <andres@anarazel.de>)
Responses Re: Excessive CPU usage in StandbyReleaseLocks()
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-06-19 13:05:48 -0400, Robert Haas wrote:
>> I don't expect you to agree with my vote, but I stand by it.

> Yea, I didn't expect (but hoped!) to change your mind... ;)

FWIW, I agree with Robert --- a PANIC here will certainly create
problems, and it's much less clear what problems it might prevent.

However, the trouble with LOG is that we would be unlikely to
notice such a message in testing, so that a test case triggering
an issue of this type would not get recognized as such.

Hence, I have a modest proposal: use elog(LOG) followed by Assert(false),
so that debug builds report such problems loudly but production builds
do not.  We've done that before, see e.g. load_relcache_init_file around
relcache.c:5718.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons
Next
From: Peter Geoghegan
Date:
Subject: Re: MERGE SQL statement for PG12