bookmark

PostgreSQL - How to find and kill a hanging query? | TablePlus


Description

SELECT * FROM pg_stat_activity WHERE state = 'active';

So you can identify the PID of the hanging query you want to terminate, run this:

SELECT pg_cancel_backend(PID);

Preview

Tags

Users

  • @jil

Comments and Reviews