YMatrix
Cluster Deployment
Data Model
Data Writing
Data Query
SQL Reference
Maintenance and Monitoring
Tool Guide
Troubleshooting
Delete the resource queue.
DROP RESOURCE QUEUE queue_name
This command deletes the resource queue from the YMatrix database. To delete a resource queue, the queue cannot assign any roles, and there cannot be any waiting statements in the queue. Only superusers can delete resource queues.
queue_name
Use ALTER ROLE to delete users from resource queues.
To view all currently active queries for all resource queues, perform the following query on the pg_locks table with the pg_roles and pg_resqueue tables:
SELECT rolname, rsqname, locktype, objid, pid,
mode, granted FROM pg_roles, pg_resqueue, pg_locks WHERE
pg_roles.rolresqueue=pg_locks.objid AND
pg_locks.objid=pg_resqueue.oid;
To view the roles assigned to the resource queue, perform the following query on the pg_roles and pg_resqueue system catalog tables:
SELECT rolname, rsqname FROM pg_roles, pg_resqueue WHERE
pg_roles.rolresqueue=pg_resqueue.oid;
Remove the role from the resource queue (and move the role to the default resource queue pg_default):
ALTER ROLE bob RESOURCE QUEUE NONE;
Delete the resource queue named adhoc:
DROP RESOURCE QUEUE adhoc;
The DROP RESOURCE QUEUE statement is a YMatrix database extension.