FS#68307 - [postgresql] llvm dep should be optional

Attached to Project: Arch Linux
Opened by Alex Xu (Hello71) - Saturday, 17 October 2020, 17:29 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 14 October 2021, 21:47 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

https://github.com/postgres/postgres/blob/master/src/backend/jit/README:

To avoid the main PostgreSQL binary directly depending on LLVM, which
would prevent LLVM support being independently installed by OS package
managers, the LLVM dependent code is located in a shared library that
is loaded on-demand.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 14 October 2021, 21:47 GMT
Reason for closing:  Won't fix
Comment by Levente Polyak (anthraxx) - Thursday, 13 May 2021, 21:05 GMT
Not sure if this would make much sense in our package. To work smoothly, this would required to split out a sub package and not distribute llvmjit.so in the main package.
Comment by Alex Xu (Hello71) - Monday, 17 May 2021, 12:07 GMT
i agree that a subpackage would be inconsistent with arch general packaging, but why does/would llvmjit.so need to be split?
Comment by Levente Polyak (anthraxx) - Monday, 17 May 2021, 12:18 GMT
because otherwise the file exists and jit is enabled, jit.c will try to load it by default which leads to an ereport via
https://github.com/postgres/postgres/blob/c30f54ad732ca5c8762bb68bbe0f51de9137dd72/src/backend/utils/fmgr/dfmgr.c#L184

this is only a clean way to do if the package is split up, which i do not want to do.
Comment by Alex Xu (Hello71) - Monday, 17 May 2021, 13:25 GMT
ah, i see. i didn't see any errors starting postgres and doing some simple queries, so assumed it would be fine. looks like it is autoloaded when heuristics activate jit (jit_above_cost), and then would error. we could disable jit by default, but i think that's straying too far from upstream. in that case, i agree with you that based on the way postgres works now, this wouldn't be appropriate for arch.

Loading...