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 data file can automatically expand.In Shared-Storage (SS) mode, the value of the
datafile_maxsizeparameter is not meaningful. You can modify this parameter, but the modification will not take effect.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Capacity |
| Default value | 0, which indicates that automatic expansion is not enabled. |
| 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 is not enabled. If you want to enable automatic expansion, set the value 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 space on the disk, the actual available space on the disk will be used as the maximum value.
Examples
In SN mode, set the maximum size to which a data file can automatically expand to 10 GB.
obclient> ALTER SYSTEM SET datafile_maxsize = '10G';