pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: James Coleman <jtc331@gmail.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)
Date: Mon, 23 Nov 2020 16:20:29 -0500
Message-ID: <129515.1606166429@sss.pgh.pa.us> (raw)
In-Reply-To: <20201123203124.GA8215@alvherre.pgsql>
References: <20201123203124.GA8215@alvherre.pgsql>

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.

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.

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <129515.1606166429@sss.pgh.pa.us>
Permalink:  ../129515.1606166429@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/129515.1606166429@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, michael@paquier.xyz, andres@anarazel.de, 9erthalion6@gmail.com, jtc331@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: "as quickly as possible" (was: remove spurious CREATE INDEX CONCURRENTLY wait)
  In-Reply-To: <129515.1606166429@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox