Updated on 2025-05-29 GMT+08:00

Other Default Parameters

This section describes the default database loading parameters.

dynamic_library_path

Parameter description: Specifies the path that the system will search for a shared database file that is dynamically loadable. When a dynamically loadable module needs to be opened and the file name specified in the CREATE FUNCTION or LOAD command does not contain a directory, the system will search this path for the required file. Only the SYSADMIN user can access this parameter. This parameter can be set at the PDB level.

Parameter type: string.

Unit: none

Value range: a list of absolute paths separated by colons (;) in Windows.

When the name of a path starts with the special variable $libdir, the variable will be replaced with the directory in which the module provided by GaussDB is installed. For example:
1
dynamic_library_path = '/usr/local/lib/gaussdb:/opt/testgs/lib:$libdir'

If the value of this parameter is set to an empty character string, the automatic path search is turned off.

Default value: "$libdir". In the PDB scenario, if this parameter is not set, the global setting is inherited.

Setting method: This is a SUSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: The dynamic library search paths specified by local_preload_libraries and shared_preload_libraries also depend on this parameter. If this parameter is left blank or set to an invalid path, the dynamic libraries fail to be loaded, which will result in abnormal database services.

local_preload_libraries

Parameter description: Specifies one or more shared libraries that are to be preloaded at connection start. If multiple shared libraries are separated with commas (,). All library names (except the names in double quotation marks) are converted to lower case.

  • Any user can change this option. Therefore, library files that can be loaded are restricted to those saved in the plugins subdirectory of the standard library installation directory. It is the database administrator's responsibility to ensure that libraries in this directory are all safe. Entries in local_preload_libraries can specify the library directory explicitly, for example, $libdir/plugins/mylib, or just specify the library name, for example, mylib. (mylib is equivalent to $libdir/plugins/mylib.)
  • Unlike shared_preload_libraries, there are no differences in performance between loading a module at session start or doing this during the session. The intent of this feature is to allow debugging or performance-measurement libraries to be loaded into specific sessions without an explicit LOAD command. For example, debugging can be enabled under a given username by setting this parameter to ALTER USER SET.
  • Every GaussDB-supported library has a "magic block" that is checked to guarantee compatibility. For this reason, non-GaussDB-supported libraries cannot be loaded in this way.

Parameter type: string.

Unit: none

Value range: a list of shared libraries separated by commas (,), or an empty string.

Default value: ""

Setting method: This is a BACKEND parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the specified library is not found, the connection fails. If the configuration is incorrect (for example, the length exceeds the limit or the directory is invalid), the process cannot be started properly.