Re: RFC: Extension Packaging & Lookup
От | David E. Wheeler |
---|---|
Тема | Re: RFC: Extension Packaging & Lookup |
Дата | |
Msg-id | 2CEE31BA-65A5-4316-A8C2-70FEF5848756@justatheory.com обсуждение исходный текст |
Ответ на | Re: RFC: Extension Packaging & Lookup (Paul Ramsey <pramsey@cleverelephant.ca>) |
Ответы |
Re: RFC: Extension Packaging & Lookup
|
Список | pgsql-hackers |
On Oct 29, 2024, at 12:23, Paul Ramsey <pramsey@cleverelephant.ca> wrote: > Thanks for this, David, 🤘🏻 > This of course is the area that worries the heck out of me, as someone with extensions that includes not just single systemdependencies but long chains of them (depending on GDAL draws in a huge tree). Yeah. I cited pgsql-http as a simple place to start, on the assumption that once we figure out how to properly configurethings for one DSO, it the pattern should work for any of them in a tree. > I’m unsure if it will work, but I have wondered if building out the dependencies to install right next to the DSO, andgiving the DSO an rpath of “.” would achieve the effect we are looking for. Given the security issues with library paths, I’d guess that relative paths are verboten. But also, Postgres does not `cd`into an extension directory before loading it, AFAIK. > It’s unfortunate (DY)LD_LIBRARY_PATH is dead and dying, but there we are. The trouble I see with somehow coercing the systemto load a local copy of system libraries is for (a) common system libs that PostgreSQL itself might be linking (libssl,for example) that then will end up with symbol collisions between the copy loaded by postgres and the copy loadedby the DSO and (b) same thing but for different extensions with the same dependencies. Yeah, this is why people tend to depend on system dependencies loaded from well-known paths, so libssl will always load thesame DSO. I imagine the use of LD_LIBRARY_PATH can cause issues today. > I guess I cannot shake the idea that a lot of interesting extensions are going to have interesting system dependencies,that “exposing an interesting library to postgres” has a high value for an integration system like PostgreSQL. Yeah, I think the issue will be to figure out how to manage OS package-provided system dependencies in immutable environmentslike a Docker container. I suspect some combination of -rpath compiled into Postgres and mounting individualDSO files not included in the base image will be the way to go. Best, David
В списке pgsql-hackers по дате отправления: