pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Yurii Rashkovskii <yrashk@omnigres.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Add Postgres module info
Date: Mon, 24 Mar 2025 15:11:55 +0100
Message-ID: <c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com> (raw)
In-Reply-To: <796058.1742757002@sss.pgh.pa.us>
References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com>
	<506788.1733941263@sss.pgh.pa.us>
	<2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com>
	<556341.1733967371@sss.pgh.pa.us>
	<0844622e-9967-409a-8038-470a36f1039c@gmail.com>
	<CAG=VW14ZmKDcxYs7irSvhVS+JeDg2W_gyR++L2GXEpzVVYQ+Yw@mail.gmail.com>
	<8b81a3c0-761f-4cfb-97c6-68819fe4d282@gmail.com>
	<982748.1734059835@sss.pgh.pa.us>
	<0e82bf8c-ae70-498d-861e-dba2bb154cad@gmail.com>
	<CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com>
	<Z7Kmann0SyoP7kDr@paquier.xyz>
	<29d29c3e-ac9e-48cc-87b4-b1cfd8c2ede8@gmail.com>
	<992ec366-5c0d-4f23-a02e-30e663613f44@gmail.com>
	<4476e8cd-6427-4470-98a8-8d61b82d8b1e@gmail.com>
	<441661.1742683797@sss.pgh.pa.us>
	<d056f9fc-b29c-48c4-81ae-d81a5bb7b5f2@gmail.com>
	<796058.1742757002@sss.pgh.pa.us>

On 3/23/25 20:10, Tom Lane wrote:
> Andrei Lepikhov <lepihov@gmail.com> writes:
>> On 3/22/25 23:49, Tom Lane wrote:
>>> * It is not clear to me what permission restrictions we should put
>>> on pg_get_loaded_modules, ...
> 
>> I vote for the idea of stripping the full path to just a filename.
> 
> Works for me.  v7 attached does it that way.
Thanks, you've done almost all the job.
> 
>>> * I'm not happy with putting pg_get_loaded_modules into dfmgr.c.
> 
>> I just attempted to reduce number of exported objects here. If it is ok
>> to introduce an iterator, the pg_get_loaded_modules() may live in
>> extension.c
> 
> Yeah, I like that better than leaving it in dfmgr.c, so done that way.
> The iterator functions also provide some cover for dealing with
> on-the-fly changes of the file list, if we ever need that.
It also gives extension developers a tool to detect conflicting modules 
any time we need it. More elegant than the SerializeLibraryState().
> 
> I converted pg_get_loaded_modules to run just once and deliver its
> results in a tuplestore.  That's partly because the adjacent SRFs
> in extension.c work like that, but mostly because it removes the
> hazard of the file list changing mid-run.
Ok.
>> Yes, additional burden to bump version string was a stopper for me to
>> propose such a brave idea.
> 
> After sleeping on it, I think we really ought to do that, so 0002
> attached does so.
With the concept of the PG_VERSION string as a version, it looks more 
meaningful than I've thought before.

Patch 0001 is ready to commit for me.
Patch 0002 I just checked on the errors in module names. That's more I 
can do here? ;) Seems good, no errors found.

-- 
regards, Andrei Lepikhov





view thread (52+ messages)  latest in thread

Message-ID: <c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com>
Permalink:  ../c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com/
Also on:    postgresql.org/message-id/c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: lepihov@gmail.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, aekorotkov@gmail.com, yrashk@omnigres.com
  Subject: Re: Add Postgres module info
  In-Reply-To: <c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com>
  References: <dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com> <506788.1733941263@sss.pgh.pa.us> <2c215c98-f713-4c5b-b21a-a4b8fa41890b@gmail.com> <556341.1733967371@sss.pgh.pa.us> <0844622e-9967-409a-8038-470a36f1039c@gmail.com> <CAG=VW14ZmKDcxYs7irSvhVS+JeDg2W_gyR++L2GXEpzVVYQ+Yw@mail.gmail.com> <8b81a3c0-761f-4cfb-97c6-68819fe4d282@gmail.com> <982748.1734059835@sss.pgh.pa.us> <0e82bf8c-ae70-498d-861e-dba2bb154cad@gmail.com> <CAPpHfduL6=LdHco_+wCk=VQyZzEd5hjLi46jtV2gQbDrpXf5Gw@mail.gmail.com> <Z7Kmann0SyoP7kDr@paquier.xyz> <29d29c3e-ac9e-48cc-87b4-b1cfd8c2ede8@gmail.com> <992ec366-5c0d-4f23-a02e-30e663613f44@gmail.com> <4476e8cd-6427-4470-98a8-8d61b82d8b1e@gmail.com> <441661.1742683797@sss.pgh.pa.us> <d056f9fc-b29c-48c4-81ae-d81a5bb7b5f2@gmail.com> <796058.1742757002@sss.pgh.pa.us> <c41a4cbc-608f-45ff-8642-49ffc7c85745@gmail.com>

* 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