Issue
Postgres connections are being used and you want to determine the source.
Resolution
You can query the internal pg_stat_activity Postgres view to find more details on the active connections:
$ heroku pg:psql -c 'select usename, application_name, backend_start, query, wait_event, backend_type from pg_stat_activity;' --app example-app
This may show connections from Heroku health checks (Heroku Postgres - Automation) and Postgres internal processes such as: high-availability standby replication, autovacuum worker, pglogical supervisor, WAL writer, checkpointer, background writer, etc.