Re: warn if GUC set to an invalid shared library
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>, "David G. Johnston" <david.g.johnston@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Cary Huang <cary.huang@highgo.ca>, Maciek Sakrejda <m.sakrejda@gmail.com>
Date: 2024-07-22T16:28:23Z
Lists: pgsql-hackers
Attachments
On Fri, May 24, 2024 at 01:15:13PM -0400, Robert Haas wrote: > + /* Note that filename was already canonicalized */ > > I see that this comment is copied from load_libraries(), but I don't > immediately see where the canonicalization actually happens. Do you > know, or can you find out? Because that's crucial here, else stat() > might not target the real filename. I wonder if it will anyway. Like, > couldn't the library be versioned, and might not dlopen() try a few > possibilities? This comment made me realize that we've been fixated on the warning. But the patch was broken, and would've always warned. I think almost all of the previous patch versions had this issue - oops. I added a call to expand_dynamic_library_name(), which seems to answer your question. And added a preparatory patch to distinguish ALTER USER/DATABASE SET from SET in a function, to avoid warning in that case. -- Justin