Determine idle clones by connections and logs
Goal
Currently we detect idle clone only by statement logs. It means that we will destroy clones with long running queries, in order to enhance working with clone we should also take into account active connections.
TODO / How to implement
select * from pg_stat_activity where query not like 'autovacuum: %' and pid <> pg_backend_pid()
Acceptance criteria
Edited by Anatoly Stansler