Note
- For V4.2.x, this parameter is available starting with V4.2.0.
- For V3.x, this parameter is available starting with V3.1.5.
Description
In Shared-Nothing (SN) mode, the
datafile_maxsizeparameter specifies the maximum size to which a disk file can automatically expand.In Shared-Storage (SS) mode, the value of the
datafile_maxsizeparameter is not applicable. You can modify the parameter, but the modification does not take effect.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Capacity |
| Default value | 0 |
| Value range | [0M, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
In SN mode, the default value of datafile_maxsize is 0, which indicates that automatic expansion of data files is not enabled. To enable automatic expansion, set datafile_maxsize to a non-zero value:
The value of
datafile_maxsizemust be greater than the current size of the data file (datafile_sizeordatafile_disk_percentage). If the value is less than the current size of the data file, automatic expansion will not be triggered.If the value of
datafile_maxsizeexceeds the maximum available disk space, the actual available disk size will be used as the maximum value.
Examples
In SN mode, set the maximum size to which a data file can be automatically expanded to 10 GB.
obclient> ALTER SYSTEM SET datafile_maxsize = '10G';