Common users can view their own session status only. The state information of other accounts is empty. For example, after user judy is connected to the database, the state information of user joe and the initial user omm in pg_stat_activity is empty.
postgres=# SELECT datname, usename, usesysid,state,pid FROM pg_stat_activity;
datname | usename | usesysid | state | pid
----------+---------+----------+--------+-----------------postgres | omm | 10 | |139968752121616
postgres | omm | 10 | |139968903116560
db_tpcds | judy | 16398 | active |139968391403280
postgres | omm | 10 | |139968643069712
postgres | omm | 10 | |139968680818448
postgres | joe | 16390 | |139968563377936
(6 rows)