Home Explore Blog CI



postgresql

43th chunk of `doc/src/sgml/monitoring.sgml`
c2985130af1fa463e5c1272e1acd7a63ccf43802511ba7110000000100000fa1
 precision</type>
      </para>
      <para>
       Time spent by database sessions in this database, in milliseconds
       (note that statistics are only updated when the state of a session
       changes, so if sessions have been idle for a long time, this idle time
       won't be included)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>active_time</structfield> <type>double precision</type>
      </para>
      <para>
       Time spent executing SQL statements in this database, in milliseconds
       (this corresponds to the states <literal>active</literal> and
       <literal>fastpath function call</literal> in
       <link linkend="monitoring-pg-stat-activity-view">
       <structname>pg_stat_activity</structname></link>)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>idle_in_transaction_time</structfield> <type>double precision</type>
      </para>
      <para>
       Time spent idling while in a transaction in this database, in milliseconds
       (this corresponds to the states <literal>idle in transaction</literal> and
       <literal>idle in transaction (aborted)</literal> in
       <link linkend="monitoring-pg-stat-activity-view">
       <structname>pg_stat_activity</structname></link>)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>sessions</structfield> <type>bigint</type>
      </para>
      <para>
       Total number of sessions established to this database
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>sessions_abandoned</structfield> <type>bigint</type>
      </para>
      <para>
       Number of database sessions to this database that were terminated
       because connection to the client was lost
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>sessions_fatal</structfield> <type>bigint</type>
      </para>
      <para>
       Number of database sessions to this database that were terminated
       by fatal errors
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>sessions_killed</structfield> <type>bigint</type>
      </para>
      <para>
       Number of database sessions to this database that were terminated
       by operator intervention
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>parallel_workers_to_launch</structfield> <type>bigint</type>
      </para>
      <para>
       Number of parallel workers planned to be launched by queries on this database
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>parallel_workers_launched</structfield> <type>bigint</type>
      </para>
      <para>
       Number of parallel workers launched by queries on this database
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Time at which these statistics were last reset
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect2>

 <sect2 id="monitoring-pg-stat-database-conflicts-view">
  <title><structname>pg_stat_database_conflicts</structname></title>

  <indexterm>
   <primary>pg_stat_database_conflicts</primary>
  </indexterm>

  <para>
   The <structname>pg_stat_database_conflicts</structname> view will contain
   one row per database, showing database-wide statistics about
   query cancels occurring due to

Title: pg_stat_database View Columns (Continued): Session Statistics, Parallel Workers, and Stats Reset
Summary
This section continues the description of the `pg_stat_database` view, now focusing on session statistics, parallel worker information, and the timestamp of the last statistics reset. It details the time spent idling in a transaction, the total number of sessions established, the number of abandoned sessions (due to lost client connections), sessions terminated by fatal errors, and sessions killed by operator intervention. Furthermore, it tracks the number of parallel workers planned to be launched and actually launched by queries on the database, along with the time the statistics were last reset.