Once you have found out that some query is blocked, you need to know who or what is blocking them.
Same as others, just use any superuser account to run the queries.
Run the following query:
SELECT w.current_query as waiting_query, w.procpid as w_pid, w.usename as w_user, l.current_query as locking_query, l.procpid as l_pid, l.usename as l_user, t.schemaname || '.' || t.relname as tablename from pg_stat_activity w join pg_locks l1 on w.procpid = l1.pid and not l1.granted join pg_locks l2 on l1.relation = l2.relation and l2.granted join pg_stat_activity l on l2.pid = l.procpid join pg_stat_user_tables t on l1.relation = t.relid where w.waiting;
It returns process ID, user, and current query about ...