Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

From: Andres Freund <andres(at)anarazel(dot)de>
To: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Devrim Gündüz <devrim(at)gunduz(dot)org>
Subject: Re: [PATCH] Skip llvm bytecode generation if LLVM is missing
Date: 2020-03-12 20:34:59
Message-ID: 20200312203459.eeool6cw6lli3aq3@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-03-12 17:22:09 -0300, Euler Taveira wrote:
> On Thu, 12 Mar 2020 at 16:25, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> > Hi,
> >
> > On 2020-03-12 14:08:31 +0800, Craig Ringer wrote:
> > >
> > > I thought about that at first, but that'll only benefit people who're
> > > hand-compiling things, and it's already possible with
> > >
> > > make with_llvm=no ...
> >
> > Well, the difference is that you'd be told about it, instead of getting
> > a hard to parse error message.
> >
> What about adding a WARNING but don't error out if LLVM isn't found? Add
> an additional option (if LLVM isn't found) is annoying because it means
> adding instruction into README of all extensions.

IMO only if the packager screwed up. The dependencies of the package
that includes pgxs, headers should have the dependencies to llvm. Which
e.g. debian's does:

$ apt show postgresql-server-dev-12
Package: postgresql-server-dev-12
Version: 12.2-1+b1
Priority: optional
Section: libdevel
Source: postgresql-12 (12.2-1)
Maintainer: Debian PostgreSQL Maintainers <team+postgresql(at)tracker(dot)debian(dot)org>
Installed-Size: 5,327 kB
Depends: clang-9, libpq-dev (>= 12~~), llvm-9-dev, postgresql-client-12, postgresql-common (>= 142~)
Breaks: postgresql-server-dev-all (<< 181~)
Homepage: http://www.postgresql.org/
Download-Size: 919 kB

I haven't looked up the dependencies for the rpm packages including the
headers.

It can make sense to split the *binary* packages so that the llvm
dependency is not incurred by default, even when the server was compiled
with LLVM support. But I see very little point in doing so for -dev[el]
packages.

> What is the side effects of not providing .bc files?

Prevent JITing the functions in that extension?

> It seems some extensions won't benefit from LLVM.

Sure, and those can disable it?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-03-12 21:00:33 Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library
Previous Message Euler Taveira 2020-03-12 20:22:09 Re: [PATCH] Skip llvm bytecode generation if LLVM is missing