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

reloptions.c

  • Tom Lane's avatar
    a844c299
    Prevent memory leaks in parseRelOptions(). · a844c299
    Tom Lane authored
    parseRelOptions() tended to leak memory in the caller's context.  Most
    of the time this doesn't really matter since the caller's context is
    at most query-lifespan, and the function won't be invoked very many times.
    However, when testing with CLOBBER_CACHE_RECURSIVELY, the same relcache
    entry can get rebuilt a *lot* of times in one query, leading to significant
    intraquery memory bloat if it has any reloptions.  Noted while
    investigating a related report from Tomas Vondra.
    
    In passing, get rid of some Asserts that are redundant with the one
    done by deconstruct_array().
    
    As with other patches to avoid leaks in CLOBBER_CACHE testing, it doesn't
    really seem worth back-patching this.
    a844c299
    History
    Prevent memory leaks in parseRelOptions().
    Tom Lane authored
    parseRelOptions() tended to leak memory in the caller's context.  Most
    of the time this doesn't really matter since the caller's context is
    at most query-lifespan, and the function won't be invoked very many times.
    However, when testing with CLOBBER_CACHE_RECURSIVELY, the same relcache
    entry can get rebuilt a *lot* of times in one query, leading to significant
    intraquery memory bloat if it has any reloptions.  Noted while
    investigating a related report from Tomas Vondra.
    
    In passing, get rid of some Asserts that are redundant with the one
    done by deconstruct_array().
    
    As with other patches to avoid leaks in CLOBBER_CACHE testing, it doesn't
    really seem worth back-patching this.