postgresql_16:4.17.4.1 Inlining Support for Extensions
PostgreSQL 16 > Server Administration > Just-in-Time Compilation (JIT) > Extensibility > Inlining Support for Extensions
PostgreSQL's JIT implementation can inline the bodies of functions of types C and internal, as well as operators based on such functions. To do so for functions in extensions, the definitions of those functions need to be made available. When using PGXS (see postgresql_16:6.1.18) to build an extension against a server that has been compiled with LLVM JIT support, the relevant files will be built and installed automatically.
The relevant files have to be installed into $pkglibdir/bitcode/$extension/ and a summary of them into $pkglibdir/bitcode/$extension.index.bc, where $pkglibdir is the directory returned by pg_config --pkglibdir and $extension is the base name of the extension's shared library. For functions built into PostgreSQL itself, the bitcode is installed into $pkglibdir/bitcode/postgres.