Postgres database Query status
Active: query is running and session is hitting every threshold time,
Idle in transaction: query is completed, and waiting for commit, session is hitting every threshold period.
Idle in transaction (aborted): last or some statement was aborted due to network or syntax error (consider here some statement executed successfully but some one only got issue),Similar to idle in transaction, except one of the statements in the transaction caused an error.
Idle: session timeout and query executed and query has been committed
Disabled: If track activities is disabled in this backend.
Note:
So Before closing session you have to issue commit otherwise work_mem will not release that particular session
So Before closing session you have to issue commit otherwise work_mem will not release that particular session
postgres 9.6 parameter : idle_in_transaction_session_timeout
Script for killing idle query automatically : Script to killing ALL IDLE Connection In Postgres Database
Script for killing idle query automatically : Script to killing ALL IDLE Connection In Postgres Database
Tag:postgres