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

pgstat.h

  • Tom Lane's avatar
    3c2313f4
    Change the pgstat logic so that the stats collector writes the stats file only · 3c2313f4
    Tom Lane authored
    upon requests from backends, rather than on a fixed 500msec cycle.  (There's
    still throttling logic to ensure it writes no more often than once per
    500msec, though.)  This should result in a significant reduction in stats file
    write traffic in typical scenarios where the stats are demanded only
    infrequently.
    
    This approach also means that the former difficulty with changing
    stats_temp_directory on-the-fly has gone away, so remove the caution about
    that as well as the thrashing we did to minimize the trouble window.
    
    In passing, also fix pgstat_report_stat() so that we will send a stats
    message if we have function call stats but not table stats to report;
    this fixes a bug in the recent patch to support function-call stats.
    
    Martin Pihlak
    3c2313f4
    History
    Change the pgstat logic so that the stats collector writes the stats file only
    Tom Lane authored
    upon requests from backends, rather than on a fixed 500msec cycle.  (There's
    still throttling logic to ensure it writes no more often than once per
    500msec, though.)  This should result in a significant reduction in stats file
    write traffic in typical scenarios where the stats are demanded only
    infrequently.
    
    This approach also means that the former difficulty with changing
    stats_temp_directory on-the-fly has gone away, so remove the caution about
    that as well as the thrashing we did to minimize the trouble window.
    
    In passing, also fix pgstat_report_stat() so that we will send a stats
    message if we have function call stats but not table stats to report;
    this fixes a bug in the recent patch to support function-call stats.
    
    Martin Pihlak