To list all currently open connections to your PostgreSQL database you can execute this SQL command:
SELECT * FROM pg_stat_get_activity(NULL::integer);
And if you need to manually close the connection that exists in the table above, you can execute the query:
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '<YOUR_DB_NAME>' AND pid <> pg_backend_pid();
Be careful – if your database client has some connection pool or is currently running a transaction – this will be interrupted, since the query ignores it.