Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7YI7-0001Df-3i for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 09:20:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7YI6-0006EX-0M for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 09:20:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7YI5-0006EI-N5 for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 09:20:17 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7YI2-001Bfs-F1 for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 09:20:17 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 8B73E60207; Fri, 9 Jun 2023 18:20:09 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 09 Jun 2023 18:20:09 +0900 From: Masahiro Ikeda To: Michael Paquier , "Drouvot, Bertrand" Cc: Robert Haas , Andres Freund , PostgreSQL Hackers Subject: Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN In-Reply-To: References: <20230516010102.jwmsuaoynz6zfqmn@awork3.anarazel.de> <20230517233832.si5zpq3qnxmx3swb@awork3.anarazel.de> <81290a48-b25c-22a5-31a6-3feff5864fe3@gmail.com> <4420c7fb5bf0894ce92d6857a8d041ed@oss.nttdata.com> <351810d2-120b-9b90-a680-cce6ac1c0fa7@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: ikedamsh@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-06-09 13:26, Drouvot, Bertrand wrote: > Hi, > > On 6/9/23 1:15 AM, Michael Paquier wrote: >> On Thu, Jun 08, 2023 at 10:57:55AM +0900, Masahiro Ikeda wrote: >>> (Excuse me for cutting in, and this is not directly related to the >>> thread.) >>> +1. I'm interested in the feature. >>> >>> This is just a example and it probable be useful for other users. >>> IMO, at >>> least, it's better to improve the specification that "Extension" >>> wait event type has only the "Extension" wait event. >> >> I hope that nobody would counter-argue you here. In my opinion, we >> should just introduce an API that allows extensions to retrieve wait >> event numbers that are allocated by the backend under >> PG_WAIT_EXTENSION, in a fashion similar to GetNamedLWLockTranche(). >> Say something like: >> int GetExtensionWaitEvent(const char *wait_event_name); > > +1, that's something I've in mind to work on once/if this patch is/get > committed. Thanks for replying. If you are ok, I'll try to make a patch to allow extensions to define custom wait events. Regards, -- Masahiro Ikeda NTT DATA CORPORATION