Description
You can execute the ALTER RESOURCE POOL statement to modify a resource pool.
Syntax
ALTER RESOURCE POOL poolname
UNIT [=] unitname,
UNIT_NUM [=] unitnum,
ZONE [=] ('zone' [, 'zone' ...]) ;
Parameters
| Parameter | Description |
|---|---|
| UNIT | The name of the resource unit that you want to use. |
| UNIT_NUM | The number of resource units that you want to create in a zone. The value must be smaller than the number of OBServers in the zone. |
| ZONE_LIST | The zones in which you want to create resource units. |
Examples
- You cannot modify multiple attributes for a resource pool at a time, such as UNIT, UNIT_NUM, and ZONE_LIST. Otherwise, the system returns an error.
OceanBase(admin@test)> ALTER RESOURCE POOL pool1 unit='unit2', unit_num=1, zone_list=('zone1');
ERROR 1235 (0A000): alter unit_num, resource_unit, zone_list in one cmd not supported
- Modify the UNIT attribute for a resource pool.
OceanBase(admin@test)> ALTER RESOURCE POOL pool1 unit='unit2';
Query OK, 0 rows affected (0.00 sec)