I'm new to postgres , I've aws rds instance running postgresql with engine version 11.5.
All my queries are clientRead has the wait_event. Why do I have all my queries in idle status.Does this mean they are idle in transaction?
What are the steps should I take to fix this?
If I change to idle_in_transaction_session_timeout to 10 mins for example will it fix this?
select count(*),state FROM pg_stat_activity group by 2;
count | state
-------+--------
5 |
1 | active
451 | idle
Select pid, datname, usename, wait_event_type, wait_event, backend_type FROM pg_stat_activity where state='idle';
pid | datname | usename | wait_event_type | wait_event | backend_type
-------+----------+--------------------------+-----------------+------------+----------------
14797 | xxxxx | user | Client | ClientRead | client backend
SELECT current_setting('idle_in_transaction_session_timeout');
current_setting
-----------------
1d
(1 row)