YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Enable Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
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.