Hello David & David,I have a similar problem -- a lot of idle transactions. I'm using the PostgreSQL JDBC driver. The connections look like this:pid | wait_event | state_change | backend_start | xact_start | query_start | ?column? | query
-------+------------+-------------------------------+-------------------------------+------------+-------------------------------+-----------------+--------
32506 | ClientRead | 2020-04-23 09:29:05.6793-07 | 2020-04-23 01:00:19.612478-07 | | 2020-04-23 09:29:05.679275-07 | 00:00:00.000025 | COMMIT
32506 | ClientRead | 2020-04-23 09:30:33.247119-07 | 2020-04-23 01:00:19.612478-07 | | 2020-04-23 09:30:33.247109-07 | 00:00:00.00001 | COMMIT
32506 | ClientRead | 2020-04-23 09:31:31.506914-07 | 2020-04-23 01:00:19.612478-07 | | 2020-04-23 09:31:31.506905-07 | 00:00:00.000009 | COMMIT
32506 | ClientRead | 2020-04-23 09:32:32.06656-07 | 2020-04-23 01:00:19.612478-07 | | 2020-04-23 09:32:32.066552-07 | 00:00:00.000008 | COMMIT
32506 | ClientRead | 2020-04-23 09:36:51.579939-07 | 2020-04-23 01:00:19.612478-07 | | 2020-04-23 09:36:51.579931-07 | 00:00:00.000008 | COMMIT
It seems like they haven't been doing anything for a long time, but the state_change keeps getting updated.
Is it possible that state_change is being updated, maybe by the JDBC driver?
Do you recommend using PgBouncer with JDBC?