llvm dependency and space concerns

From: Jeremy Schneider <schneider(at)ardentperf(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: llvm dependency and space concerns
Date: 2025-01-11 20:56:19
Message-ID: 20250111125619.336303fe@jeremy-ThinkPad-T430s
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Schneider 2025-01-11 21:01:08 Re: llvm dependency and space concerns
Previous Message Tom Lane 2025-01-11 19:04:13 Re: pgbench error: (setshell) of script 0; execution of meta-command failed