I have a situation where the pg_stat_activity view shows that can have
some processes that are idle and not completing. In some cases the
statement being executed is COMMIT.
How can I investigate WHY these processes are not completing. Presumably
they are waiting on something, but I'm not sure how to work out what
this is.
Thanks
Tim