Re: warn if GUC set to an invalid shared library - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: warn if GUC set to an invalid shared library
Date
Msg-id Zp6IpxVT1U-qmMOC@pryzbyj2023
Whole thread Raw
In response to Re: warn if GUC set to an invalid shared library  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: warn if GUC set to an invalid shared library
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: xid_wraparound tests intermittent failure.
Next
From: Jeff Davis
Date:
Subject: Re: [18] Policy on IMMUTABLE functions and Unicode updates