Can someone resolve my below doubts about pg_stat_activity
in terms of postgres 9.5?
- Can some let me know what does the
state
IDLE
denotes in the row ofpg_stat_activity
? Is it like it checks all the open connections to postgres and if the connection is not executing any query thenIDLE
denotes the last query executed by the connection? - In the output of
select * from pg_stat_activity
I am seeing rows withstate
IDLE
and thequery_start_date
more 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_activity
does it produce the details from some snapshot maintained by postgres or it checks the current connections open in postgres to provide the details?
Best Answer
This has been answered in postgres mailing list