Tags: waiting-o postgres workaround oid from refresh ATI Solution
SELECT * from pg_stat_activity WHERE datname= ' database name ' and waiting= ' t ';
Find the value of the PID column used
Select OID from Pg_class where relname= ' may lock table table '--oid is the ID hidden by each table
Select PID from pg_locks where relation= ' oid ' above detected
Select Pg_cancel_backend ("pid value of the deadlock data");
Once you have finished running, refresh the table again and SQL will execute smoothly.
PostgreSQL View Deadlocks and workarounds