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

execTuples.c

  • Tom Lane's avatar
    9dbc6d25
    Minor code review for tuple slot rewrite. · 9dbc6d25
    Tom Lane authored
    Avoid creating transiently-inconsistent slot states where possible,
    by not setting TTS_FLAG_SHOULDFREE until after the slot actually has
    a free'able tuple pointer, and by making sure that we reset tts_nvalid
    and related derived state before we replace the tuple contents.  This
    would only matter if something were to examine the slot after we'd
    suffered some kind of error (e.g. out of memory) while manipulating
    the slot.  We typically don't do that, so these changes might just be
    cosmetic --- but even if so, it seems like good future-proofing.
    
    Also remove some redundant Asserts, and add a couple for consistency.
    
    Back-patch to v12 where all this code was rewritten.
    
    Discussion: https://postgr.es/m/16095-c3ff2e5283b8dba5@postgresql.org
    9dbc6d25
    History
    Minor code review for tuple slot rewrite.
    Tom Lane authored
    Avoid creating transiently-inconsistent slot states where possible,
    by not setting TTS_FLAG_SHOULDFREE until after the slot actually has
    a free'able tuple pointer, and by making sure that we reset tts_nvalid
    and related derived state before we replace the tuple contents.  This
    would only matter if something were to examine the slot after we'd
    suffered some kind of error (e.g. out of memory) while manipulating
    the slot.  We typically don't do that, so these changes might just be
    cosmetic --- but even if so, it seems like good future-proofing.
    
    Also remove some redundant Asserts, and add a couple for consistency.
    
    Back-patch to v12 where all this code was rewritten.
    
    Discussion: https://postgr.es/m/16095-c3ff2e5283b8dba5@postgresql.org