llvm dependency and space concerns - Mailing list pgsql-hackers

From Jeremy Schneider
Subject llvm dependency and space concerns
Date
Msg-id 20250111125619.336303fe@jeremy-ThinkPad-T430s
Whole thread Raw
Responses Re: llvm dependency and space concerns
Re: llvm dependency and space concerns
Re: llvm dependency and space concerns
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgbench error: (setshell) of script 0; execution of meta-command failed
Next
From: Jeremy Schneider
Date:
Subject: Re: llvm dependency and space concerns