SQL to display Database Locks and Resource Queues in Greenplum

The gadget spec URL could not be found

--check_waiting_lock

SELECT usename,COUNT(DISTINCT pid) FROM pg_locks l JOIN pg_stat_activity a ON (a.procpid=l.pid) WHERE l.granted IS FALSE GROUP BY 1 ORDER BY count DESC;

The gadget spec URL could not be found

 

The gadget spec URL could not be found


--check_size_of_resource_queue

SELECT * FROM pg_resqueue_status;

The gadget spec URL could not be found
Comments