Home Explore Blog CI



postgresql

54th chunk of `doc/src/sgml/monitoring.sgml`
b33f972a504c3b201b3dbf954bc64af80958bd318e4762720000000100000fa2
  The <xref linkend="guc-track-functions"/> parameter
   controls exactly which functions are tracked.
  </para>

  <table id="pg-stat-user-functions-view" xreflabel="pg_stat_user_functions">
   <title><structname>pg_stat_user_functions</structname> View</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>funcid</structfield> <type>oid</type>
      </para>
      <para>
       OID of a function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>schemaname</structfield> <type>name</type>
      </para>
      <para>
       Name of the schema this function is in
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>funcname</structfield> <type>name</type>
      </para>
      <para>
       Name of this function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>calls</structfield> <type>bigint</type>
      </para>
      <para>
       Number of times this function has been called
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>total_time</structfield> <type>double precision</type>
      </para>
      <para>
       Total time spent in this function and all other functions
       called by it, in milliseconds
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>self_time</structfield> <type>double precision</type>
      </para>
      <para>
       Total time spent in this function itself, not including
       other functions called by it, in milliseconds
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect2>

 <sect2 id="monitoring-pg-stat-slru-view">
  <title><structname>pg_stat_slru</structname></title>

  <indexterm>
   <primary>SLRU</primary>
  </indexterm>

  <indexterm>
   <primary>pg_stat_slru</primary>
  </indexterm>

  <para>
   <productname>PostgreSQL</productname> accesses certain on-disk information
   via <literal>SLRU</literal> (<firstterm>simple least-recently-used</firstterm>)
   caches.
   The <structname>pg_stat_slru</structname> view will contain
   one row for each tracked SLRU cache, showing statistics about access
   to cached pages.
  </para>

  <para>
   For each <literal>SLRU</literal> cache that's part of the core server,
   there is a configuration parameter that controls its size, with the suffix
   <literal>_buffers</literal> appended.
  </para>

  <table id="pg-stat-slru-view" xreflabel="pg_stat_slru">
   <title><structname>pg_stat_slru</structname> View</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>
      <para>
       Description
      </para></entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>name</structfield> <type>text</type>
      </para>
      <para>
       Name of the SLRU
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>blks_zeroed</structfield> <type>bigint</type>
      </para>
      <para>
       Number of blocks zeroed during initializations
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>blks_hit</structfield> <type>bigint</type>
      </para>
      <para>
       Number

Title: pg_stat_user_functions View Details and Introduction to pg_stat_slru View
Summary
This section details the columns of the `pg_stat_user_functions` view, including `funcid`, `schemaname`, `funcname`, `calls`, `total_time`, and `self_time`. These columns provide information about function execution statistics. The section then introduces the `pg_stat_slru` view, which contains statistics about access to simple least-recently-used (SLRU) caches. Each SLRU cache that's part of the core server has a corresponding configuration parameter with the suffix `_buffers` that controls its size.