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

execProcnode.c

Blame
    • Amit Kapila's avatar
      dac7fe13
      Fix buffer usage stats for parallel nodes. · dac7fe13
      Amit Kapila authored
      The buffer usage stats is accounted only for the execution phase of the
      node.  For Gather and Gather Merge nodes, such stats are accumulated at
      the time of shutdown of workers which is done after execution of node due
      to which we missed to account them for such nodes.  Fix it by treating
      nodes as running while we shut down them.
      
      We can also miss accounting for a Limit node when Gather or Gather Merge
      is beneath it, because it can finish the execution before shutting down
      such nodes.  So we allow a Limit node to shut down the resources before it
      completes the execution.
      
      In the passing fix the gather node code to allow workers to shut down as
      soon as we find that all the tuples from the workers have been retrieved.
      The original code use to do that, but is accidently removed by commit
      01edb5c7.
      
      Reported-by: Adrien Nayrat
      Author: Amit Kapila and Robert Haas
      Reviewed-by: Robert Haas and Andres Freund
      Backpatch-through: 9.6 where this code was introduced
      Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info
      dac7fe13
      History
      Fix buffer usage stats for parallel nodes.
      Amit Kapila authored
      The buffer usage stats is accounted only for the execution phase of the
      node.  For Gather and Gather Merge nodes, such stats are accumulated at
      the time of shutdown of workers which is done after execution of node due
      to which we missed to account them for such nodes.  Fix it by treating
      nodes as running while we shut down them.
      
      We can also miss accounting for a Limit node when Gather or Gather Merge
      is beneath it, because it can finish the execution before shutting down
      such nodes.  So we allow a Limit node to shut down the resources before it
      completes the execution.
      
      In the passing fix the gather node code to allow workers to shut down as
      soon as we find that all the tuples from the workers have been retrieved.
      The original code use to do that, but is accidently removed by commit
      01edb5c7.
      
      Reported-by: Adrien Nayrat
      Author: Amit Kapila and Robert Haas
      Reviewed-by: Robert Haas and Andres Freund
      Backpatch-through: 9.6 where this code was introduced
      Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info