aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_gin.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-07 14:25:11 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-07 14:25:11 -0400
commit04e5025be8bbe572e12b19c4ba9e2a8360b8ffe5 (patch)
treeb3ca927510db0f037f27feefe7cfe8670baedb59 /src/backend/utils/adt/jsonb_gin.c
parente2ce9aa27bf20eff2d991d0267a15ea5f7024cd7 (diff)
downloadpostgresql-04e5025be8bbe572e12b19c4ba9e2a8360b8ffe5.tar.gz
postgresql-04e5025be8bbe572e12b19c4ba9e2a8360b8ffe5.zip
Fix failure to set ActiveSnapshot while rewinding a cursor.
ActiveSnapshot needs to be set when we call ExecutorRewind because some plan node types may execute user-defined functions during their ReScan calls (nodeLimit.c does so, at least). The wisdom of that is somewhat debatable, perhaps, but for now the simplest fix is to make sure the required context is valid. Failure to do this typically led to a null-pointer-dereference core dump, though it's possible that in more complex cases a function could be executed with the wrong snapshot leading to very subtle misbehavior. Per report from Leif Jensen. It's been broken for a long time, so back-patch to all active branches.
Diffstat (limited to 'src/backend/utils/adt/jsonb_gin.c')
0 files changed, 0 insertions, 0 deletions