Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

portals.sql

  • Tom Lane's avatar
    022b5f2b
    Fix failure to set ActiveSnapshot while rewinding a cursor. · 022b5f2b
    Tom Lane authored
    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.
    022b5f2b
    History
    Fix failure to set ActiveSnapshot while rewinding a cursor.
    Tom Lane authored
    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.