Home Explore Blog CI



postgresql

13th chunk of `doc/src/sgml/monitoring.sgml`
9bbc5ba4ffcb6b75f685b500f5f723c9bce2ac401c7136440000000100000fa6
 transaction was started, or null
       if no transaction is active. If the current
       query is the first of its transaction, this column is equal to the
       <structfield>query_start</structfield> column.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>query_start</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Time when the currently active query was started, or if
       <structfield>state</structfield> is not <literal>active</literal>, when the last query
       was started
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>state_change</structfield> <type>timestamp with time zone</type>
      </para>
      <para>
       Time when the <structfield>state</structfield> was last changed
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>wait_event_type</structfield> <type>text</type>
      </para>
      <para>
       The type of event for which the backend is waiting, if any;
       otherwise NULL.  See <xref linkend="wait-event-table"/>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>wait_event</structfield> <type>text</type>
      </para>
      <para>
       Wait event name if backend is currently waiting, otherwise NULL.
       See <xref linkend="wait-event-activity-table"/> through
       <xref linkend="wait-event-timeout-table"/>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>state</structfield> <type>text</type>
      </para>
      <para>
       Current overall state of this backend.
       Possible values are:
       <itemizedlist>
        <listitem>
         <para>
          <literal>starting</literal>: The backend is in initial startup. Client
          authentication is performed during this phase.
         </para>
        </listitem>
        <listitem>
        <para>
          <literal>active</literal>: The backend is executing a query.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>idle</literal>: The backend is waiting for a new client command.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>idle in transaction</literal>: The backend is in a transaction,
          but is not currently executing a query.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>idle in transaction (aborted)</literal>: This state is similar to
          <literal>idle in transaction</literal>, except one of the statements in
          the transaction caused an error.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>fastpath function call</literal>: The backend is executing a
          fast-path function.
         </para>
        </listitem>
        <listitem>
         <para>
          <literal>disabled</literal>: This state is reported if <xref linkend="guc-track-activities"/> is disabled in this backend.
         </para>
       </listitem>
       </itemizedlist>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>backend_xid</structfield> <type>xid</type>
      </para>
      <para>
       Top-level transaction identifier of this backend, if any;  see
       <xref linkend="transaction-id"/>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>backend_xmin</structfield> <type>xid</type>
      </para>
      <para>
       The current backend's <literal>xmin</literal> horizon.
      </para></entry>
     </row>

    <row>
     <entry

Title: pg_stat_activity View Details: Wait Events, State, and Transaction Information
Summary
This section of the pg_stat_activity view details columns related to backend wait events (wait_event_type, wait_event), the current overall state of the backend (state) with possible values like 'starting', 'active', 'idle', and transaction-related states, and transaction identifiers (backend_xid, backend_xmin).