- PostgreSQL has extremely informative documentation regarding how it collects and maintains statistics. The pg_stat_activity view is described in more depth there, so take a look at this URL: https://www.postgresql.org/docs/current/static/monitoring-stats.html
See also
Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.