Fix JITed EEOP_AGG_INIT_TRANS, which missed some state.

Andres Freund <andres@anarazel.de>

Commit: 6b4d860311e99621681f25db5db82f88348d8ea6
Author: Andres Freund <andres@anarazel.de>
Date: 2018-07-23T00:00:41Z
Releases: 12.0
Fix JITed EEOP_AGG_INIT_TRANS, which missed some state.

The JIT compiled implementation missed maintaining
AggState->{current_set,curaggcontext}. That could lead to trouble
because the transition value could be allocated in the wrong context.

Reported-By: Rushabh Lathia
Diagnosed-By: Dmitry Dolgov
Author: Dmitry Dolgov, with minor changes by me
Discussion: https://postgr.es/m/CAGPqQf165-=+Drw3Voim7M5EjHT1zwPF9BQRjLFQzCzYnNZEiQ@mail.gmail.com
Backpatch: 11-, where JIT compilation support was added

Files

PathChange+/−
src/backend/jit/llvm/llvmjit_expr.c modified +22 −0

Discussion