1. 07 Jul, 2021 1 commit
  2. 17 May, 2021 1 commit
  3. 15 May, 2021 1 commit
  4. 23 Apr, 2021 1 commit
  5. 21 Apr, 2021 1 commit
  6. 09 Apr, 2021 1 commit
  7. 08 Apr, 2021 1 commit
    • Magnus Hagander's avatar
      Track identical top vs nested queries independently in pg_stat_statements · 6b4d23fe
      Magnus Hagander authored
      Changing pg_stat_statements.track between 'all' and 'top' would control
      if pg_stat_statements tracked just top level statements or also
      statements inside functions, but when tracking all it would not
      differentiate between the two. Being table to differentiate this is
      useful both to track where the actual query is coming from, and to see
      if there are differences in executions between the two.
      
      To do this, add a boolean to the hash key indicating if the statement
      was top level or not.
      
      Experience from the pg_stat_kcache module shows that in at least some
      "reasonable worloads" only <5% of the queries show up both top level and
      nested. Based on this, admittedly small, dataset, this patch does not
      try to de-duplicate those query *texts*, and will just store one copy
      for the top level and one for the nested.
      
      Author: Julien Rohaud
      Reviewed-By: Magnus Hagander, Masahiro Ikeda
      Discussion: https://postgr.es/m/20201202040516.GA43757@nol
      6b4d23fe
  8. 07 Apr, 2021 1 commit
    • Bruce Momjian's avatar
      Move pg_stat_statements query jumbling to core. · 5fd9dfa5
      Bruce Momjian authored
      Add compute_query_id GUC to control whether a query identifier should be
      computed by the core (off by default).  It's thefore now possible to
      disable core queryid computation and use pg_stat_statements with a
      different algorithm to compute the query identifier by using a
      third-party module.
      
      To ensure that a single source of query identifier can be used and is
      well defined, modules that calculate a query identifier should throw an
      error if compute_query_id specified to compute a query id and if a query
      idenfitier was already calculated.
      
      Discussion: https://postgr.es/m/20210407125726.tkvjdbw76hxnpwfi@nol
      
      Author: Julien Rouhaud
      
      Reviewed-by: Alvaro Herrera, Nitin Jadhav, Zhihong Yu
      5fd9dfa5
  9. 24 Dec, 2020 1 commit
  10. 18 Dec, 2020 1 commit
    • Fujii Masao's avatar
      pg_stat_statements: Track time at which all statistics were last reset. · 2e0fedf0
      Fujii Masao authored
      This commit adds "stats_reset" column into the pg_stat_statements_info
      view. This column indicates the time at which all statistics in the
      pg_stat_statements view were last reset.
      
      Per discussion, this commit also changes pg_stat_statements_info code
      so that "dealloc" column is reset at the same time as "stats_reset" is reset,
      i.e., whenever all pg_stat_statements entries are removed, for the sake
      of consistency. Previously "dealloc" was reset only when
      pg_stat_statements_reset(0, 0, 0) is called and was not reset when
      pg_stat_statements_reset() with non-zero value argument discards all
      entries. This was confusing.
      
      Author: Naoki Nakamichi, Yuki Seino
      Reviewed-by: Yuki Seino, Kyotaro Horiguchi, Li Japin, Fujii Masao
      Discussion: https://postgr.es/m/c102cf3180d0ee73c1c5a0f7f8558322@oss.nttdata.com
      2e0fedf0
  11. 26 Nov, 2020 1 commit
    • Fujii Masao's avatar
      pg_stat_statements: Track number of times pgss entries were deallocated. · 9fbc3f31
      Fujii Masao authored
      If more distinct statements than pg_stat_statements.max are observed,
      pg_stat_statements entries about the least-executed statements are
      deallocated. This commit enables us to track the total number of times
      those entries were deallocated. That number can be viewed in the
      pg_stat_statements_info view that this commit adds. It's useful when
      tuning pg_stat_statements.max parameter. If it's high, i.e., the entries
      are deallocated very frequently, which might cause the performance
      regression and we can increase pg_stat_statements.max to avoid those
      frequent deallocations.
      
      The pg_stat_statements_info view is intended to display the statistics
      of pg_stat_statements module itself. Currently it has only one column
      "dealloc" indicating the number of times entries were deallocated.
      But an upcoming patch will add other columns (for example, the time
      at which pg_stat_statements statistics were last reset) into the view.
      
      Author: Katsuragi Yuta, Yuki Seino
      Reviewed-by: Fujii Masao
      Discussion: https://postgr.es/m/0d9f1107772cf5c3f954e985464c7298@oss.nttdata.com
      9fbc3f31
  12. 06 Jul, 2020 1 commit
  13. 03 Jul, 2020 1 commit
    • Fujii Masao's avatar
      Change default of pg_stat_statements.track_planning to off. · d1763ea8
      Fujii Masao authored
      Since v13 pg_stat_statements is allowed to track the planning time of
      statements when track_planning option is enabled. Its default was on.
      
      But this feature could cause more terrible spinlock contentions in
      pg_stat_statements. As a result of this, Robins Tharakan reported that
      v13 beta1 showed ~45% performance drop at high DB connection counts
      (when compared with v12.3) during fully-cached SELECT-only test using
      pgbench.
      
      To avoid this performance regression by the default setting,
      this commit changes default of pg_stat_statements.track_planning to off.
      
      Back-patch to v13 where pg_stat_statements.track_planning was introduced.
      
      Reported-by: Robins Tharakan
      Author: Fujii Masao
      Reviewed-by: Julien Rouhaud
      Discussion: https://postgr.es/m/2895b53b033c47ccb22972b589050dd9@EX13D05UWC001.ant.amazon.com
      d1763ea8
  14. 14 May, 2020 2 commits
  15. 05 May, 2020 1 commit
    • Amit Kapila's avatar
      Change the display of WAL usage statistics in Explain. · 69bfaf2e
      Amit Kapila authored
      In commit 33e05f89, we have added the option to display WAL usage
      statistics in Explain and auto_explain.  The display format used two spaces
      between each field which is inconsistent with Buffer usage statistics which
      is using one space between each field.  Change the format to make WAL usage
      statistics consistent with Buffer usage statistics.
      
      This commit also changed the usage of "full page writes" to
      "full page images" for WAL usage statistics to make it consistent with
      other parts of code and docs.
      
      Author: Julien Rouhaud, Amit Kapila
      Reviewed-by: Justin Pryzby, Kyotaro Horiguchi and Amit Kapila
      Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
      69bfaf2e
  16. 13 Apr, 2020 1 commit
  17. 09 Apr, 2020 1 commit
  18. 05 Apr, 2020 1 commit
  19. 02 Apr, 2020 1 commit
  20. 11 Jan, 2019 1 commit
    • Amit Kapila's avatar
      Extend pg_stat_statements_reset to reset statistics specific to a · 43cbedab
      Amit Kapila authored
      particular user/db/query.
      
      The function pg_stat_statements_reset() is extended to accept userid, dbid,
      and queryid as input parameters.  Now, it can discard the statistics
      gathered so far by pg_stat_statements corresponding to the specified
      userid, dbid, and queryid.  If no parameter is specified or all the
      specified parameters have default value aka 0, it will discard all
      statistics as per the old behavior.
      
      The new behavior is useful to get the fresh statistics for a specific
      user/database/query without resetting all the existing statistics.
      
      Author: Haribabu Kommi, with few additional changes by me
      Reviewed-by: Michael Paquier, Amit Kapila and Fujii Masao
      Discussion: https://postgr.es/m/CAJrrPGcyh-gkFswyc6C661K6cknL0XkNqVT0sQt2mFNMR4HRKA@mail.gmail.com
      43cbedab
  21. 23 Nov, 2017 1 commit
    • Peter Eisentraut's avatar
      Convert documentation to DocBook XML · 3c49c6fa
      Peter Eisentraut authored
      Since some preparation work had already been done, the only source
      changes left were changing empty-element tags like <xref linkend="foo">
      to <xref linkend="foo"/>, and changing the DOCTYPE.
      
      The source files are still named *.sgml, but they are actually XML files
      now.  Renaming could be considered later.
      
      In the build system, the intermediate step to convert from SGML to XML
      is removed.  Everything is build straight from the source files again.
      The OpenSP (or the old SP) package is no longer needed.
      
      The documentation toolchain instructions are updated and are much
      simpler now.
      
      Peter Eisentraut, Alexander Lakhin, Jürgen Purtz
      3c49c6fa
  22. 17 Oct, 2017 1 commit
    • Peter Eisentraut's avatar
      Don't use SGML empty tags · c29c5789
      Peter Eisentraut authored
      For DocBook XML compatibility, don't use SGML empty tags (</>) anymore,
      replace by the full tag name.  Add a warning option to catch future
      occurrences.
      
      Alexander Lakhin, Jürgen Purtz
      c29c5789
  23. 30 Mar, 2017 2 commits
    • Tom Lane's avatar
      Fix broken markup. · ab1e6440
      Tom Lane authored
      Per buildfarm.
      ab1e6440
    • Simon Riggs's avatar
      Default monitoring roles · 25fff407
      Simon Riggs authored
      Three nologin roles with non-overlapping privs are created by default
      * pg_read_all_settings - read all GUCs.
      * pg_read_all_stats - pg_stat_*, pg_database_size(), pg_tablespace_size()
      * pg_stat_scan_tables - may lock/scan tables
      
      Top level role - pg_monitor includes all of the above by default, plus others
      
      Author: Dave Page
      Reviewed-by: Stephen Frost, Robert Haas, Peter Eisentraut, Simon Riggs
      25fff407
  24. 28 Mar, 2017 1 commit
  25. 05 Oct, 2015 1 commit
  26. 09 May, 2015 1 commit
  27. 27 Mar, 2015 1 commit
  28. 17 Jul, 2014 1 commit
  29. 07 May, 2014 1 commit
    • Peter Eisentraut's avatar
      doc: Fix DocBook XML validity · 3a9d430a
      Peter Eisentraut authored
      The main problem is that DocBook SGML allows indexterm elements just
      about everywhere, but DocBook XML is stricter.  For example, this common
      pattern
      
          <varlistentry>
           <indexterm>...</indexterm>
           <term>...</term>
           ...
          </varlistentry>
      
      needs to be changed to something like
      
          <varlistentry>
           <term>...<indexterm>...</indexterm></term>
           ...
          </varlistentry>
      
      See also bb4eefe7.
      
      There is currently nothing in the build system that enforces that things
      stay valid, because that requires additional tools and will receive
      separate consideration.
      3a9d430a
  30. 27 Jan, 2014 1 commit
    • Tom Lane's avatar
      Keep pg_stat_statements' query texts in a file, not in shared memory. · f0d6f202
      Tom Lane authored
      This change allows us to eliminate the previous limit on stored query
      length, and it makes the shared-memory hash table very much smaller,
      allowing more statements to be tracked.  (The default value of
      pg_stat_statements.max is therefore increased from 1000 to 5000.)
      In typical scenarios, the hash table can be large enough to hold all the
      statements commonly issued by an application, so that there is little
      "churn" in the set of tracked statements, and thus little need to do I/O
      to the file.
      
      To further reduce the need for I/O to the query-texts file, add a way
      to retrieve all the columns of the pg_stat_statements view except for
      the query text column.  This is probably not of much interest for human
      use but it could be exploited by programs, which will prefer using the
      queryid anyway.
      
      Ordinarily, we'd need to bump the extension version number for the latter
      change.  But since we already advanced pg_stat_statements' version number
      from 1.1 to 1.2 in the 9.4 development cycle, it seems all right to just
      redefine what 1.2 means.
      
      Peter Geoghegan, reviewed by Pavel Stehule
      f0d6f202
  31. 13 Dec, 2013 1 commit
  32. 07 Dec, 2013 2 commits
  33. 04 Jul, 2013 1 commit
  34. 29 Apr, 2012 2 commits
  35. 28 Apr, 2012 1 commit
    • Tom Lane's avatar
      Adjust timing units in pg_stat_statements. · 93f94e35
      Tom Lane authored
      Display total time and I/O timings in milliseconds, for consistency with
      the units used for timings in the core statistics views.  The columns
      remain of float8 type, so that sub-msec precision is available.  (At some
      point we will probably want to convert the core views to use float8 type
      for the same reason, but this patch does not touch that issue.)
      
      This is a release-note-requiring change in the meaning of the total_time
      column.  The I/O timing columns are new as of 9.2, so there is no
      compatibility impact from redefining them.
      
      Do some minor copy-editing in the documentation, too.
      93f94e35
  36. 13 Apr, 2012 1 commit