SHOW SUBSCRIBED INSTANCES
SHOW SUBSCRIBED INSTANCES lists the cluster workers and their service queues.
Note
If you haven’t already, read the Workload manager guide.
See also SUBSCRIBE SERVICE, UNSUBSCRIBE SERVICE.
Permissions
Listing the service queues requires no special permissions.
Syntax
show_subscribed_instances_statement ::=
SELECT SHOW_SUBSCRIBED_INSTANCES( [ service_name ] );
service_name ::= text
Parameters
Parameter |
Description |
|---|---|
|
Optional. A service name, to list only the workers subscribed to that service. If no worker is subscribed to it, the function returns |
Notes
This function applies to clusters using the workload manager.
Examples
List service queues and workers
Each worker is assigned an automatic ID, and is subscribed to the 'sqream' queue upon start.
t=> SELECT SHOW_SUBSCRIBED_INSTANCES();
service | server node | server ip | server port
--------+------------+---------------+-----------
sqream | node_9383 | 192.168.0.111 | 5000
sqream | node_9384 | 192.168.0.111 | 5001
sqream | node_9385 | 192.168.0.111 | 5002
sqream | node_9551 | 192.168.1.91 | 5000
This list shows all cluster nodes, their service names, IPs, and ports.