After a resource pool is created, you can modify it based on your business needs.
You can also modify a resource pool to scale in or out resources for tenants. For example, you can modify the unit_num parameter to increase or decrease the number of nodes in each zone.
Use SQL statements to modify a resource pool
The following is the syntax of the statement for modifying a resource pool:
ALTER RESOURCE POOL poolname
UNIT [=] unitname,
UNIT_NUM [=] unitnum,
ZONE_LIST [=] ('zone' [, 'zone' ...]);
Note:
You can run the SQL statement to modify only one parameter at a time.
You can modify only resource pools that are not in use and that contain no resource unit.
For a newly created resource pool, you cannot modify the
zone_listparameter.
Example:
To replace resource unit unit1 of resource pool pool1 with unit2:
obclient> ALTER RESOURCE POOL pool1 unit='unit2'If resource pool pool1 is in use, an error will be returned:
obclient> ALTER RESOURCE POOL pool1 zone_list=('HANGZHOU_1'); ERROR 4179 (HY000): alter resource pool zone list with non-empty unit not allowedIf you modify more than one parameter for the resource pool, an error will be returned:
obclient> ALTER RESOURCE POOL pool1 unit='unit1', zone_list=('HANGZHOU_1'); ERROR 1235 (0A000): alter unit_num, resource_unit, zone_list in one cmd not supported