Kill Existing Processes or Transactions
How to
- Check existing process PID
SELECT * FROM pg_stat_activity;
- Find the process you want to kill, then type:
SELECT pg_cancel_backend(<pid of the process>)
or force kill (terminate) within
SELECT pg_terminate_backend(<pid of the process>)