Re: JIT breaks PostGIS

2018-07-25 Thread Andres Freund
Hi, On 2018-07-25 21:59:32 +0200, Christoph Berg wrote: > Re: Andres Freund 2018-07-25 > <20180725195037.jmykfzfporf6a...@alap3.anarazel.de> > > The way inlining works is that, when referencing a function, the bitcode > > summary file corresponding to it (either postgres.index.bc if builtin or >

Re: JIT breaks PostGIS

2018-07-25 Thread Christoph Berg
Re: Andres Freund 2018-07-25 <20180725195037.jmykfzfporf6a...@alap3.anarazel.de> > > Different question, the other way round, is there a way to know that > > all files needed to inline a query/extension are there? How does the > > JIT machinery determine it can (try to) compile things? (That's > >

Re: JIT breaks PostGIS

2018-07-25 Thread Andres Freund
Hi, On 2018-07-25 21:39:26 +0200, Christoph Berg wrote: > Re: Andres Freund 2018-07-25 > <20180725191143.sietxlbfehv24...@alap3.anarazel.de> > > I haven't investigated the details here. It certainly would be possible > > to have the _PG_init() of postgis's so force JIT to be off, and emit a > >

Re: JIT breaks PostGIS

2018-07-25 Thread Christoph Berg
Re: Andres Freund 2018-07-25 <20180725191143.sietxlbfehv24...@alap3.anarazel.de> > I haven't investigated the details here. It certainly would be possible > to have the _PG_init() of postgis's so force JIT to be off, and emit a > warning. Isn't that too late, if postgis.so gets loaded by a query

Re: JIT breaks PostGIS

2018-07-25 Thread Andres Freund
Hi, On 2018-07-25 21:05:33 +0200, Christoph Berg wrote: > > > It'll only be an issue for extensions that throw c++ style exceptions. I > > > don't think that rises to the level of disallowing any LLVM version < > > > 5.0. I suggest postgis adds an error check to its buildprocess that > > > refuses

Re: JIT breaks PostGIS

2018-07-25 Thread Christoph Berg
Re: Darafei "Komяpa" Praliaskouski 2018-07-23 > > It looks to me like it's a LLVM issue, specifically > > https://bugs.llvm.org/show_bug.cgi?id=34424 > > fixed in LLVM 5+. > > > > Thank you for your investigation. Thanks! > > It'll only be an issue for extensions that throw c++ style exception

Re: JIT breaks PostGIS

2018-07-23 Thread Komяpa
Hello, пн, 23 июл. 2018 г. в 8:13, Andres Freund : > Hi, > > On 2018-07-21 23:14:47 +0300, Darafei "Komяpa" Praliaskouski wrote: > > > > I suspect that a fix would require to bisect llvm/clang version which > stops > > showing this behavior and making it a new minimum for JIT, if this is > not a

Re: JIT breaks PostGIS

2018-07-22 Thread Andres Freund
Hi, On 2018-07-21 23:14:47 +0300, Darafei "Komяpa" Praliaskouski wrote: > Today I spent some time closing PostGIS tickets in preparation to Monday's > release. > > One of the blockers, https://trac.osgeo.org/postgis/ticket/4125, was filed > by Postgres APT repository maintainer Christoph Berg who

Re: JIT breaks PostGIS

2018-07-22 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Christoph Berg writes: > > The question will be coming up eventually, though, and I think the > > options on the packaging side are: > > > 1) Disable jit completely > > 2) Compile --with-llvm, but disable jit in the config by default > > 3) Com

Re: JIT breaks PostGIS

2018-07-22 Thread Tom Lane
Christoph Berg writes: > The question will be coming up eventually, though, and I think the > options on the packaging side are: > 1) Disable jit completely > 2) Compile --with-llvm, but disable jit in the config by default > 3) Compile --with-llvm, but disable jit for older llvm versions > 4) En

Re: JIT breaks PostGIS

2018-07-22 Thread Christoph Berg
Re: Andres Freund 2018-07-22 <20180722185106.qxc5ie745tqda...@alap3.anarazel.de> > > Does that mean JIT is not ready for prime time yet and should be > > disabled in default installations? Or does it just mean that llvm 4.0 > > is old? > > I don't know yet, it's probably just some small bug. But l

Re: JIT breaks PostGIS

2018-07-22 Thread Andres Freund
On 2018-07-22 20:49:51 +0200, Christoph Berg wrote: > Re: To Andres Freund 2018-07-21 <20180721203644.gb10...@msg.df7cb.de> > > That said, I'm just rebuilding postgresql-11 on stretch to use > > llvm-4.0 instead of 3.9. > > This didn't change anything, it's still crashing on the same query > from

Re: JIT breaks PostGIS

2018-07-22 Thread Christoph Berg
Re: To Andres Freund 2018-07-21 <20180721203644.gb10...@msg.df7cb.de> > That said, I'm just rebuilding postgresql-11 on stretch to use > llvm-4.0 instead of 3.9. This didn't change anything, it's still crashing on the same query from tickets.sql. Does that mean JIT is not ready for prime time yet

Re: JIT breaks PostGIS

2018-07-21 Thread Komяpa
Hi, Here's somewhat minimized example. https://gist.github.com/Komzpa/cc3762175328ff5d11de4b972352003d You can put this file into regress/jitbug.sql in PostGIS code tree and run after building postgis: perl regress/run_test.pl regress/jitbug.sql --expect perl regress/run_test.pl regress/jitbug.

Re: JIT breaks PostGIS

2018-07-21 Thread Andres Freund
Hi, On 2018-07-21 22:36:44 +0200, Christoph Berg wrote: > Re: Andres Freund 2018-07-21 > <20180721202543.ri5jyfclj6kb6...@alap3.anarazel.de> > > Could you attempt to come up with a smaller reproducer? > > The original instructions in > https://trac.osgeo.org/postgis/ticket/4125 are fairly easy t

Re: JIT breaks PostGIS

2018-07-21 Thread Christoph Berg
Re: Andres Freund 2018-07-21 <20180721202543.ri5jyfclj6kb6...@alap3.anarazel.de> > Could you attempt to come up with a smaller reproducer? The original instructions in https://trac.osgeo.org/postgis/ticket/4125 are fairly easy to follow; there's also a postgresql-11-postgis-2.5{,-scripts} package

Re: JIT breaks PostGIS

2018-07-21 Thread Andres Freund
Hi, On 2018-07-21 23:14:47 +0300, Darafei "Komяpa" Praliaskouski wrote: > Today I spent some time closing PostGIS tickets in preparation to Monday's > release. > > One of the blockers, https://trac.osgeo.org/postgis/ticket/4125, was filed > by Postgres APT repository maintainer Christoph Berg who