Re: pg11.1 jit segv

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Date: 2018-11-16T00:11:05Z
Lists: pgsql-hackers
On Thu, Nov 15, 2018 at 06:03:34PM -0600, Justin Pryzby wrote:
> Verbose plan, munged for brevity/sanity due to joining wide tables, and
> redacted since the view probably has to be considered proprietary.  Hopefully
> the remaining bits are still useful.  I replaced column names with x.

Actually the view isn't as intricate as I thought, but I'd like to avoid
publishing it for sake of simplicity.  I replaced the view with its underlying
table and now I get:

[pryzbyj@database ~]$ time psql ts -f tmp/sql-jit-crash-2018-11-15.jtp 
psql:tmp/sql-jit-crash-2018-11-15.jtp:12: ERROR:  invalid memory alloc request size 2447889552

It's unclear if that's a useful hint, a separate problem, or a nonissue..

Justin


Commits

  1. Fix jit compilation bug on wide tables.

  2. Verify that expected slot types match returned slot types.

  3. Rejigger materializing and fetching a HeapTuple from a slot.