Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)
Date
Msg-id 20201123212802.GA8237@alvherre.pgsql
Whole thread Raw
In response to Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2020-Nov-23, Tom Lane wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > On 2020-Nov-19, Michael Paquier wrote:
> >> By the way, it strikes me that you could just do nothing as long as
> >> (log_min_messages > DEBUG1), so you could encapsulate most of the
> >> logic that plays with the lock tag using that.
> 
> > Good idea, done.
> 
> I'm less sure that that's a good idea.  It embeds knowledge here that
> should not exist outside elog.c; moreover, I'm not entirely sure that
> it's even correct, given the nonlinear ranking of log_min_messages.

Well, we already do this in a number of places.  But I can get behind
this:

> Maybe it'd be a good idea to have elog.c expose a new function
> along the lines of "bool message_level_is_interesting(int elevel)"
> to support this and similar future optimizations in a less fragile way.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)
Next
From: Anastasia Lubennikova
Date:
Subject: Re: deferred primary key and logical replication