Note
This parameter is available starting with V4.3.5 BP1.
Overview
plugins_load specifies the plugins to load when Observer starts. You can specify multiple dynamic link library (DLL) plugins and their loading strategies. Plugins are loaded only during the initialization of the Observer process and cannot be dynamically loaded afterward.
Applicability
This parameter takes effect only in MySQL-compatible mode of OceanBase Database.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Only the
systenant can modify this parameter. User tenants cannot modify it.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | "" (empty string) |
| Value range | The format islibname1.so:option1,libname2.so:option2,..., where:
|
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to Restart the OBServer Node for the Change to Take Effect | Yes, the modification takes effect only after the OBServer node is restarted. |
Usage instructions
OceanBase provides plugin capabilities to help you easily extend system functionality. You can adjust the plugins that need to be loaded during the next startup of a cluster when deploying or while the cluster is running.
Plugin loading process
- Place the dynamic link library files (such as
libsoname.so) in theplugin_dirdirectory of each Observer process. - Specify the plugins to load using startup parameters or configuration items
- Restart the entire cluster or restart each OBServer node in sequence.
Configuration format
Configuration values follow a specific format and support specifying multiple plugins and their loading strategies simultaneously:
libsoname1.so:on,libsoname2.so:off
The meanings of each field are as follows:
- libsoname1.so:on: Loads the
libsoname1.soplugin. Loading failure does not affect process startup. - libsoname2.so:off: Do not load the
libsoname2.soplugin.
Configuration method
Method 1: Using 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: Adjust via system parameters (during runtime)
To modify parameters and specify plugins to load during the next startup while the cluster is running:
obclient> ALTER SYSTEM SET plugins_load='libsoname1.so:on,libsoname2.so:off';
After the configuration is modified, you must restart the OBServer node for the changes to take effect.
Plugin type description
- Dynamic library plugins: Independent dynamic link libraries (.so files) loaded into the process using
dlopen. - Static plugins: Plugins compiled together with the observer executable program.
Currently, OceanBase primarily provides an interface for full-text index tokenization plugins. Users can develop custom plugins or adapt third-party tokenization libraries based on this interface.
Considerations
- Plugins cannot be loaded dynamically. Configuration changes take effect only after the process is restarted.
- Loading is supported only on a per-dynamic library basis. Loading individual plugins within a single dynamic library is not supported.
- Plugins within a dynamic library are typically designed to work together as a cohesive unit and are not recommended for loading separately.
- The plugin files must be placed in the
plugin_dirdirectory; otherwise, they cannot be loaded.
Configuration example
Set up Observer to load the libob_tokenizer.so plugin upon its next startup. A loading failure will not prevent the process from starting:
obclient> ALTER SYSTEM SET plugins_load='libob_tokenizer.so:on';
