ALTER SERVICE ACCOUNT UNSET RESOURCE GROUP reference
Resource groups isolate competing query workloads inside a single QuestDB instance.
ALTER SERVICE ACCOUNT ... UNSET RESOURCE GROUP removes the service account's
resource group mapping.
Syntax
ALTER SERVICE ACCOUNT serviceAccountName UNSET RESOURCE GROUP;
Description
The service account returns to DEFAULT. Unlike a user, it has no ACL group
mapping to fall back to, because a service account cannot belong to a group.
Unsetting therefore leaves it governed only by DEFAULT's policy.
The statement requires the
RESOURCE GROUP ADMIN permission, and affects
queries that start after the change rather than one already running.
Unmapping is also the prerequisite for dropping a resource group:
DROP RESOURCE GROUP is refused
while any principal is still mapped to it.
Examples
ALTER SERVICE ACCOUNT client_app UNSET RESOURCE GROUP;
SHOW SERVICE ACCOUNTS then reports null in the resource_group column,
which for a service account means DEFAULT:
SELECT name, resource_group FROM (SHOW SERVICE ACCOUNTS);
| name | resource_group |
|---|---|
| client_app | null |