Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qR8FQ-000exb-L4 for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 09:34:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qR8FP-004EkV-4C for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Aug 2023 09:34:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qR8FO-004EkN-R0 for pgsql-hackers@lists.postgresql.org; Wed, 02 Aug 2023 09:34:27 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qR8FI-0006jk-0k for pgsql-hackers@lists.postgresql.org; Wed, 02 Aug 2023 09:34:25 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 7C86B60134; Wed, 2 Aug 2023 18:34:15 +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: Wed, 02 Aug 2023 18:34:15 +0900 From: Masahiro Ikeda To: Andres Freund Cc: Michael Paquier , Bharath Rupireddy , Tristan Partin , pgsql-hackers@lists.postgresql.org Subject: Re: Support to define custom wait events for extensions In-Reply-To: <20230801032349.aaiuvhtrcvvcwzcx@awork3.anarazel.de> References: <446d286f3272437df705ee69ad0d8793@oss.nttdata.com> <171b38978ae8a21e5635998d9bfedbf6@oss.nttdata.com> <20230801032349.aaiuvhtrcvvcwzcx@awork3.anarazel.de> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <9cc4136f9e3629a2ffc8ac66b4de3f31@oss.nttdata.com> X-Sender: ikedamsh@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-08-01 12:23, Andres Freund wrote: > Hi, > > On 2023-08-01 12:14:49 +0900, Michael Paquier wrote: >> On Tue, Aug 01, 2023 at 11:51:35AM +0900, Masahiro Ikeda wrote: >> > Thanks for committing the main patch. >> > >> > In my understanding, the rest works are >> > * to support WaitEventExtensionMultiple() >> > * to replace WAIT_EVENT_EXTENSION to custom wait events >> > >> > Do someone already works for them? If not, I'll consider >> > how to realize them. >> >> Note that postgres_fdw and dblink use WAIT_EVENT_EXTENSION, but have >> no dependency to shared_preload_libraries. Perhaps these could just >> use a dynamic handling but that deserves a separate discussion because >> of the fact that they'd need shared memory without being able to >> request it. autoprewarm.c is much simpler. > > This is why the scheme as implemented doesn't really make sense to me. > It'd be > much easier to use if we had a shared hashtable with the identifiers > than > what's been merged now. > > In plenty of cases it's not realistic for an extension library to run > in each > backend, while still needing to wait for things. OK, I'll try to make a PoC patch. Regards, -- Masahiro Ikeda NTT DATA CORPORATION