Ephemeral inconsistencies across multiple attributes of pg_stat_activity
can exist as the system is designed to be efficient with a low overhead.
This question is raised by users from time to time based on the data
read in the view, so let's add a note in the docs about this
possibility.
Author: Alex Friedman <
[email protected]>
Reviewed-by: Sami Imseih <[email protected]>
Discussion: https://postgr.es/m/
8a275154-a654-44b0-ab37-
197802f04c7b@gmail.com
     it may or may not be <literal>waiting</literal> on some event.  If the state
     is <literal>active</literal> and <structfield>wait_event</structfield> is non-null, it
     means that a query is being executed, but is being blocked somewhere
-    in the system.
+    in the system.  To keep the reporting overhead low, the system does not
+    attempt to synchronize different aspects of activity data for a backend.
+    As a result, ephemeral discrepancies may exist between the view's columns.
    </para>
   </note>