I'm running Postgres in containers, and recently did some analysis of
the total container sizes. I posted some analysis over on the debian
packaging mailing list [1] [2]. The TLDR is that LLVM alone makes up
33% of a postgres container's bytes (143MB / 434MB) [1].

Per the details in the referenced emails, dpkg Installed-Size:
libllvm16     120542 KB
libz3-4       22767 KB

(Note that libz3 is a dependency of libllvm.)

For plperl, plpython and pltcl we are able to split those into separate
debian packages because Postgres' extension framework enables us to
install the files separately without a recompile, and Postgres can be
compiled with these configure flags but still works fine if the files
aren't present.

I haven't yet looked closely, but my assumption is that the --with-llvm
flag may not work the same. I'm going to spend some time taking a look,
but if someone knows off the top of their head and can give me a head
start that would be appreciated!

Given the large number of bytes that LLVM pulls into a postgres build,
I think it would be a good idea to have the ability to split it into a
separate [recommended, but optional] package. There are use cases like
embedded and IoT - in addition to containers - where some postgres users
value this level of space savings over JIT.

Thanks
-Jeremy Schneider


Reply via email to