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 the parameter
The
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
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 is libname1.so:option1,libname2.so:option2,..., where:
|
| Modifiable | Yes. You can modify it by using the ALTER SYSTEM SET statement. |
| 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 it 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 via startup parameters or configuration items
- Restart the entire cluster or restart each OBServer node in sequence.
Configuration format description
Configuration values follow a specific format and support specifying multiple plugins and their loading strategies simultaneously:
libsoname1.so:on,libsoname2.so:off
The following table describes the parameters.
- libsoname1.so:on: Loads the
libsoname1.soplugin. Loading failure does not affect process startup. - libsoname2.so:off: Do not load the
libsoname2.soplugin.
Configuration methods
Method 1: Using command-line parameters (when deploying a cluster for the first time)
When starting the observer process, specify the -L parameter:
observer -Llibsoname1.so:on,libsoname2.so:off
Method 2: Adjust via system parameters (during runtime)
To modify parameters during cluster runtime and specify plugins to load on the next startup:
obclient> ALTER SYSTEM SET plugins_load='libsoname1.so:on,libsoname2.so:off';
After configuration modifications take effect, you must restart the OBServer node for them to apply.
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.
- Only loading on a dynamic library basis is supported. 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 affect the process startup:
obclient> ALTER SYSTEM SET plugins_load='libob_tokenizer.so:on';
