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 1tLa3G-00FgQS-TS for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 03:39:46 +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 1tLa3E-006Hyv-4n for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 03:39:45 +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 1tLa3D-006Hym-Rs for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 03:39:45 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLa3C-002NQh-Hb for pgsql-hackers@postgresql.org; Thu, 12 Dec 2024 03:39:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4BC3dcuu570944; Wed, 11 Dec 2024 22:39:38 -0500 From: Tom Lane To: Michael Paquier cc: Euler Taveira , Andres Freund , Andrei Lepikhov , pgsql-hackers Subject: Re: Add Postgres module info In-reply-to: References: <506788.1733941263@sss.pgh.pa.us> <2qdclwljzvw5abfvo4porr3ehox32icrbtfjaum327ruxts6qm@udexcbweewpq> <556165.1733967268@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Thu, 12 Dec 2024 12:24:39 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <570942.1733974778.1@sss.pgh.pa.us> Date: Wed, 11 Dec 2024 22:39:38 -0500 Message-ID: <570943.1733974778@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Wed, Dec 11, 2024 at 08:34:28PM -0500, Tom Lane wrote: >> What would you foresee as the SQL API for inspecting a module that's >> not tied to an extension? > Rather than a function that can be called with a specific module name > in input, invent a new system SRF function that would report back for > a process all the libraries that have been loaded in it? Yeah, that could work. > Presumably, > the extra tracking can be done in dfmgr.c with more fields added to > DynamicFileList to track the information involved. I wouldn't add any overhead to the normal case for this. Couldn't we walk the list and re-fetch each module's magic block inside this new function? regards, tom lane