Re: RTLD_GLOBAL (& JIT inlining) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RTLD_GLOBAL (& JIT inlining)
Date
Msg-id 24744.1548309734@sss.pgh.pa.us
Whole thread Raw
In response to Re: RTLD_GLOBAL (& JIT inlining)  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: RTLD_GLOBAL (& JIT inlining)  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> With the attached patch, external modules are loaded RTLD_LOCAL
> by default. PG_MODULE_EXPORT_SYMBOL in a module source files let
> it loaded RTLD_GLOBAL. I suppose this is the change with the
> least impact on existing modules because I believe most of them
> don't need to export symbols.

This seems really hacky :-(

In the PL cases, at least, it's not so much the PL itself that
wants to export symbols as the underlying language library
(libpython, libperl, etc).  You're assuming that an action on
the PL .so will propagate to the underlying language .so, which
seems like a pretty shaky assumption.  I wonder also whether
closing and reopening the DL handle will really do anything
at all for already-loaded libraries ...

            regards, tom lane


pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: RTLD_GLOBAL (& JIT inlining)
Next
From: "Imai, Yoshikazu"
Date:
Subject: RE: speeding up planning with partitions