Note
This parameter is available starting from V4.3.5 BP1.
Description
plugins_load specifies the plugins to be loaded when the OBServer starts. This parameter supports specifying multiple dynamic-link library plugins and their loading strategies. Plugins are loaded only during OBServer process initialization and do not support dynamic loading.
Applicability
This parameter is applicable only to OceanBase Database in MySQL-compatible mode.
Privilege requirements
Query the parameter
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 | String |
| Default value | "" (empty string) |
| Value range | The format is libname1.so:option1,libname2.so:option2,..., where:
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | Yes. The setting takes effect after an OBServer restart. |
Usage notes
The plugin capability provided by OceanBase helps you extend system functionality more easily. You can configure the plugins to be loaded at the next cluster startup during deployment or during cluster operation.
Plugin loading process
- Place the dynamic-link library files (such as
libsoname.so) in theplugin_dirdirectory of each OBServer process. - Specify the plugins to be loaded through startup parameters or configuration items.
- Restart the entire cluster or restart each OBServer node in sequence.
Configuration format description
The configuration value uses a specific format that supports specifying multiple plugins and their loading strategies at the same time:
libsoname1.so:on,libsoname2.so:off
Field descriptions:
- libsoname1.so:on: loads the
libsoname1.soplugin. If loading fails, the process startup is not affected. - libsoname2.so:off: does not load the
libsoname2.soplugin.
Configuration methods
Method 1: Through command-line parameters (during initial cluster deployment)
Specify the -L parameter when starting the observer process:
observer -Llibsoname1.so:on,libsoname2.so:off
Method 2: Through system configuration items (during cluster operation)
Modify the configuration item during cluster operation to specify the plugins to be loaded at the next startup:
obclient> ALTER SYSTEM SET plugins_load='libsoname1.so:on,libsoname2.so:off';
After modifying the configuration, you need to restart the OBServer node for the setting to take effect.
Plugin type description
- Dynamic library plugins: Independent dynamic-link libraries (
.sofiles) loaded into the process throughdlopen. - Static plugins: Plugins compiled together with the observer executable.
Currently, OceanBase mainly provides full-text index tokenizer plugin interfaces. Users can develop custom plugins or adapt third-party tokenizer libraries based on this interface.
Considerations
- Plugins cannot be dynamically loaded. After modifying the configuration, you must restart the process for the setting to take effect.
- Only loading at the dynamic library level is supported. Loading partial plugins from a single dynamic library is not supported.
- Plugins within a dynamic library typically work together as a set. It is not recommended to load them separately.
- Plugin files must be placed in the
plugin_dirdirectory. Otherwise, they cannot be loaded.
Examples
Configure the OBServer to load the libob_tokenizer.so plugin at the next startup. If loading fails, the process startup is not affected:
obclient> ALTER SYSTEM SET plugins_load='libob_tokenizer.so:on';
