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

nodeSubplan.c

  • Jeff Davis's avatar
    b419865a
    In array_agg(), don't create a new context for every group. · b419865a
    Jeff Davis authored
    Previously, each new array created a new memory context that started
    out at 8kB. This is incredibly wasteful when there are lots of small
    groups of just a few elements each.
    
    Change initArrayResult() and friends to accept a "subcontext" argument
    to indicate whether the caller wants the ArrayBuildState allocated in
    a new subcontext or not. If not, it can no longer be released
    separately from the rest of the memory context.
    
    Fixes bug report by Frank van Vugt on 2013-10-19.
    
    Tomas Vondra. Reviewed by Ali Akbar, Tom Lane, and me.
    b419865a
    History
    In array_agg(), don't create a new context for every group.
    Jeff Davis authored
    Previously, each new array created a new memory context that started
    out at 8kB. This is incredibly wasteful when there are lots of small
    groups of just a few elements each.
    
    Change initArrayResult() and friends to accept a "subcontext" argument
    to indicate whether the caller wants the ArrayBuildState allocated in
    a new subcontext or not. If not, it can no longer be released
    separately from the rest of the memory context.
    
    Fixes bug report by Frank van Vugt on 2013-10-19.
    
    Tomas Vondra. Reviewed by Ali Akbar, Tom Lane, and me.