Can someone resolve my below doubts about
pg_stat_activity in terms of postgres 9.5?
- Can some let me know what does the
IDLEdenotes in the row of
pg_stat_activity? Is it like it checks all the open connections to postgres and if the connection is not executing any query then
IDLEdenotes the last query executed by the connection?
- In the output of
select * from pg_stat_activityI am seeing rows with
query_start_datemore than 2 days old? What does this signify ? Should I be worried about this?
- Can someone let me know how pg_stat_activity is populated? If I am executing a query like
Select * from pg_stat_activitydoes it produce the details from some snapshot maintained by postgres or it checks the current connections open in postgres to provide the details?