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

Logging Content

debug_print_parse

Parameter description: Specifies whether to print parsing tree results.

Parameter type: Boolean

Unit: None

Value range:

  • on: The printing is enabled.
  • off: The printing is disabled.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

debug_print_rewritten

Parameter description: Specifies whether to print query rewriting results.

Parameter type: Boolean

Unit: None

Value range:

  • on: The printing is enabled.
  • off: The printing is disabled.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

debug_print_plan

Parameter description: Specifies whether to print the query execution plan to logs.

Parameter type: Boolean

Unit: None

Value range:

  • on: The query execution plan is printed to logs.
  • off: The query execution plan is not printed to logs.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

  • Debugging information about debug_print_parse, debug_print_rewritten, and debug_print_plan is printed only when the log level is set to log or higher. When these parameters are set to on, their debugging information will be recorded in server logs and will not be sent to client logs. You can change the log level by setting client_min_messages and log_min_messages.
  • Do not call the gs_encrypt_aes128 and gs_decrypt_aes128 functions when debug_print_plan is set to on, preventing the risk of sensitive information disclosure. You are advised to filter parameter information of the gs_encrypt_aes128 and gs_decrypt_aes128 functions in the log files generated when debug_print_plan is set to on before providing the log files to external maintenance engineers for fault locating. After you finish using the logs, delete them as soon as possible.

debug_pretty_print

Parameter description: If this parameter is enabled, logs generated by debug_print_parse, debug_print_rewritten, and debug_print_plan are indented and output in a longer format that is easy to read. This parameter can be set at the PDB level.

Parameter type: Boolean

Unit: None

Value range:

  • on: The indentation is enabled.
  • off: The indentation is disabled.

Default value: on. In the PDB scenario, if this parameter is not set, the global settings will apply.

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_checkpoints

Parameter description: Specifies whether the statistics on checkpoints and restart points are recorded in the server logs. When this parameter is set to on, statistics on checkpoints and restart points are recorded in the log messages, including the number of buffers written and the time spent in writing them.

Parameter type: Boolean

Unit: None

Value range:

  • on: Statistics on checkpoints and restart points are recorded in the server logs.
  • off: Statistics on checkpoints and restart points are not recorded in the server logs

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_connections

Parameter description: Specifies whether to record logs of connection requests from the client. Logs include the IP address, port number, username, database name, and duration of key steps in the GaussDB connection setup process.

Some client programs (such as gsql) attempt to connect to the database twice when determining whether a password is required. Therefore, the log message may contain duplicate "connection receive" (indicating that a connection request is received).

Parameter type: Boolean

Unit: None

Value range:

  • on indicates that the logs are recorded.
  • off indicates that the logs are not recorded.

Default value: off

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: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_disconnections

Parameter description: Specifies whether to record disconnection request information of the client.

Parameter type: Boolean

Unit: None

Value range:

  • on: The information is recorded.
  • off: The information is not recorded.

Default value: off

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: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_duration

Parameter description: Specifies whether to record the duration of every completed SQL statement. For clients using extended query protocols, the time required for parsing, binding, and executing steps are logged independently. This parameter can be set at the PDB level.

Parameter type: Boolean

Unit: None

Value range:

  • on: The execution time of all completed SQL statements is recorded.
  • off: The execution time of SQL statements is not recorded.

    If this parameter is set to on or log_min_duration_statement is set to 0, the execution time of each completed SQL statement is recorded. The difference is that log_min_duration_statement forcibly records SQL statements.

Default value: off. In the PDB scenario, if this parameter is not set, the global settings will apply.

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: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_error_verbosity

Parameter description: Specifies the content output to the server log for each message that is logged. This parameter can be set at the PDB level.

Value type: enumerated type.

Unit: None

Value range:

  • terse: The record excludes the DETAIL, HINT, QUERY, and CONTEXT error information.
  • verbose: The record includes the SQLSTATE error code, the source code file name, function name, and number of the line in which the error occurs.
  • default: The record includes the DETAIL, HINT, QUERY, and CONTEXT error information, and excludes the SQLSTATE error code, the source code file name, function name, and number of the line in which the error occurs.

Default value: default. In the PDB scenario, if this parameter is not set, the global settings will apply.

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

Setting suggestion: Set this parameter according to the requirement for the detail level of the log message. You are advised to use the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_hostname

Parameter description: By default, connection log messages only show the IP address of the connecting host. If this parameter is enabled, the host name is also recorded. It may take some time to parse the host name. Therefore, the database performance may be affected.

Parameter type: Boolean

Unit: None

Value range:

  • on: The host name is recorded.
  • off: The host name is not recorded.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: The database performance may be affected when this parameter is enabled.

log_line_prefix

Parameter description: Specifies the prefix format of each log. A prefix is a printf-style string that is output at the beginning of each line of the log. The escape character starting with % indicates the status information. For details, see Table 1.

Table 1 Escape characters

Escape Character

Status Information

%a

Application name.

%u

Username.

%d

Database name.

%r

Remote host name or IP address and remote port. If log_hostname is set to off, only the IP address and remote port are displayed.

%h

Remote host name or IP address. If log_hostname is set to off, only the IP address is displayed.

%p

Thread ID.

%t

Timestamp without milliseconds.

%m

Timestamp with milliseconds.

%n

Node to which an error is reported.

%i

Command tag: type of command executed in the current session.

%e

SQLSTATE error code.

%c

Session ID. For details, see the note below the table.

%l

Number of the log line for each session or thread, starting at 1.

%s

Thread startup time.

%v

Virtual transaction ID (backend ID/local XID).

%x

Transaction ID (0 indicates that no transaction ID is assigned).

%q

Produces no output. If the current thread is a backend thread, this escape sequence is ignored and subsequent escape sequences are processed. Otherwise, this escape sequence and subsequent escape sequences are all ignored.

%S

Session ID.

%T

Trace ID.

%%

The character %.

The %c escape character prints a session ID consisting of two 4-byte hexadecimal numbers separated by a period (.). The two hexadecimal numbers indicate the thread startup time and thread ID, respectively. Therefore, %c can also be used to record the thread startup time and thread ID, which saves space. For example, you can use the following query to generate such a hexadecimal session ID from pg_stat_activity:
1
2
3
SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' ||
       to_hex(pid)
FROM pg_stat_activity;
  • If you set a nonempty value for log_line_prefix, you should usually make its last character be a space, to provide visual separation from the rest of the log line. A punctuation character can be used, too.
  • Syslog generates its own timestamp and thread ID information. Therefore, you do not need to include those escape characters when you are logging in to syslog.

Parameter type: String

Unit: None

Value range: a string

Default value: %m %n %u %d %h %p %S %x %a

%m %n %u %d %h %p %S %x %a indicates the session start timestamp, error reporting node, username, database name, remote host name or IP address, thread ID, session ID, transaction ID, and application name.

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

Setting suggestion: Set this parameter based on the requirements for log status information.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_lock_waits

Parameter description: When the time for a session to wait for a lock exceeds the value of deadlock_timeout, this parameter specifies whether to record the message in the database log. This helps determine whether the lock wait event causes problems such as deadlock. This parameter can be set at the PDB level.

Parameter type: Boolean

Unit: None

Value range:

  • on: The information is recorded.
  • off: The information is not recorded.

Default value: off. In the PDB scenario, if this parameter is not set, the global settings will apply.

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: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_statement

Parameter description: Specifies which SQL statements are recorded. For clients using extended query protocols, logging occurs when an execute message and values (enclosed by a pair of single quotation marks) of bound parameters are received. This parameter can be set at the PDB level.

  • Statements that contain simple syntax errors are not logged even if log_statement is set to all, because logging occurs only after basic parsing has been completed and the statement type is determined. If an extended query protocol is used, statements that fail before the execution phase (during parsing or planning) are not logged, either. Set log_min_error_statement to ERROR or lower to log such statements.
  • If this parameter is set to a value other than none, the statement audit function is enabled. The database administrator can access server logs to view SQL execution records.

Value type: enumerated type.

Unit: None

Value range:

  • none: No SQL statement is recorded.
  • ddl: All data definition statements, such as CREATE, ALTER, and DROP, are recorded.
  • mod: All DDL statements and data modification statements, such as INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM, are recorded.
  • all: All statements, including the PREPARE, EXECUTE, and EXPLAIN ANALYZE statements, are recorded.

Default value: none. In the PDB scenario, if this parameter is not set, the global settings will apply.

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

Setting suggestion: Set this parameter based on whether SQL statements need to be recorded.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

log_temp_files

Parameter description: Specifies whether to record the deletion information about temporary files whose size is greater than the value of this parameter. Temporary files can be created for sorting, hashing, and storing temporary querying results. If the recording is enabled, a log entry is generated for each temporary file when it is deleted. This parameter can be set at the PDB level.

Parameter type: Integer

Unit: KB

Value range: –1 to 2147483647

  • A positive value indicates that the deletion information of temporary files whose size is larger than the value specified by log_temp_files is recorded.
  • 0 indicates that the delete information of all temporary files is recorded.
  • –1 indicates that the delete information of any temporary files is not recorded.

Default value: –1. In the PDB scenario, if this parameter is not set, the global settings will apply.

Setting method: This is a SUSET parameter. Set it based on instructions provided in Table 1. If the value is an integer, the default unit is KB. If the value contains a unit, the unit must be KB, MB, or GB. For example, if the value is 16384 without a unit, log_temp_files indicates 16384 KB. If the value is 16MB, log_temp_files indicates 16 MB.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If this parameter is set to a value other than –1, more temporary files that meet the recording requirements indicate more logs are recorded, affecting the system performance. If the value is out of the range or the value contains a unit other than KB, MB, and GB, an error message is displayed.

log_timezone

Parameter description: Specifies the time zone used for timestamps written in the server log. Different from TimeZone, this parameter takes effect for all sessions in the database.

Parameter type: String

Unit: None

Value range: a string. You can query the PG_TIMEZONE_NAMES view to obtain the value. For details, see "System Catalogs and System Views > System Views > PG_TIMEZONE_NAMES" in Developer Guide.

Default value: Set this parameter based on the OS time zone.

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

The default value will be changed when gs_initdb is used to set system environments.

logging_module

Parameter description: Specifies whether module logs are output on the server. This parameter depends on the setting of the log_min_messages parameter. Module logs whose levels are lower than the value of log_min_messages will not be printed.

Parameter type: String

Unit: None

Default value: 'off(ALL)'. That is, all module logs are disabled by default. In the PDB scenario, if this parameter is not set, the global settings will apply.

Value range: All module logs are not output on the server. You can run the SHOW logging_module command to view the logs.

1
ALL,on(),off(COMMAND,DFS,GUC,GSCLEAN,HDFS,ORC,SLRU,MEM_CTL,AUTOVAC,CACHE,ADIO,SSL,GDS,TBLSPC,WLM,OBS,INDEX,EXECUTOR,OPFUSION,GPC,GSC,VEC_EXECUTOR,STREAM,LLVM,OPT,OPT_REWRITE,CBOPT_REWRITE,OPT_JOIN,OPT_AGG,OPT_CHOICE,OPT_SUBPLAN,OPT_SETOP,OPT_SKEW,OPT_PLANNER,OPT_STAT_EXT,SPM,SPM_KEY_FLOW,UDF,COOP_ANALYZE,WLMCP,ACCELERATE,PLANHINT,PARQUET,PGSTAT,CARBONDATA,SNAPSHOT,XACT,HANDLE,CLOG,EC,REMOTE,CN_RETRY,PLSQL,TEXTSEARCH,SEQ,REDO,FUNCTION,PARSER,INSTR,WDR_SNAPSHOT,WDR_REPORT,ASP_REPORT,INCRE_CKPT,INCRE_BG_WRITER,DBL_WRT,RTO_RPO,HEARTBEAT,COMM_IPC,COMM_PARAM,TIMESERIES,SCHEMA,GTT,SEGMENT_PAGE,LIGHTPROXY,HOTKEY,THREAD_POOL,OPT_AI,WALRECEIVER,USTORE,UPAGE,UBTREE,UNDO,TIMECAPSULE,GEN_COL,DCF,AI4DB,DB4AI,ABO,MOD_ABOFEEDBACK,PLDEBUGGER,ADVISOR,SEC,SEC_FE,SEC_LEGER,SEC_POLICY,SEC_SDD,SEC_TDE,COMM_FRAMEWORK,COMM_PROXY,COMM_POOLER,COMM_STATUS,VACUUM,JOB,SPI,NEST_COMPILE,RESOWNER,GSSTACK,LOGICAL_DECODE,GPRC,DISASTER_READ,STANDBY_READ,REPSYNC,SQLPATCH,PARTITION,UBT_NEWPAGE,GPI,GS_DEPENDENCY,LWLOCK,LOCK,UNIQUE_SQL,GLC,SRF,DBLINK,BARRIER_CREATOR,EXRTO_PAGE_P,SEQ_TUP_P,BT_TUP_P,DISPATCH_VERIFY,HBKT,DBE_STATS,DBE_XMLGEN,GS_ILM,GSPERF,EXEC_REMOTE,UBTREE_PARA,BTREE_PARA,ANTI_CACHE,ANTI_RECYCLER,VERIFYLOG,GS_REPAIR,AUTHID,CCINDEX,ONLINE_DDL,MTD,EXRTO_BUFFER,STREAM_PBE,HTAP,UALT,GTM_LITE_READ_S,UGIN)

CN_RETRY does not take effect in the current version.

Setting method: This is a session-level parameter, and you are advised not to use the gs_guc tool to set it. This parameter can be set at the PDB level.

Setting method: Run SHOW logging_module to view which modules are controllable. For example, the query output result is as follows:

1
2
3
4
5
gaussdb=# show logging_module;
logging_module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ALL,on(),off(COMMAND,DFS,GUC,GSCLEAN,HDFS,ORC,SLRU,MEM_CTL,AUTOVAC,CACHE,ADIO,SSL,GDS,TBLSPC,WLM,OBS,INDEX,EXECUTOR,OPFUSION,GPC,GSC,VEC_EXECUTOR,STREAM,LLVM,OPT,OPT_REWRITE,CBOPT_REWRITE,OPT_JOIN,OPT_AGG,OPT_CHOICE,OPT_SUBPLAN,OPT_SETOP,OPT_SKEW,OPT_PLANNER,OPT_STAT_EXT,SPM,SPM_KEY_FLOW,UDF,COOP_ANALYZE,WLMCP,ACCELERATE,PLANHINT,PARQUET,PGSTAT,CARBONDATA,SNAPSHOT,XACT,HANDLE,CLOG,EC,REMOTE,CN_RETRY,PLSQL,TEXTSEARCH,SEQ,REDO,FUNCTION,PARSER,INSTR,WDR_SNAPSHOT,WDR_REPORT,ASP_REPORT,INCRE_CKPT,INCRE_BG_WRITER,DBL_WRT,RTO_RPO,HEARTBEAT,COMM_IPC,COMM_PARAM,TIMESERIES,SCHEMA,GTT,SEGMENT_PAGE,LIGHTPROXY,HOTKEY,THREAD_POOL,OPT_AI,WALRECEIVER,USTORE,UPAGE,UBTREE,UNDO,TIMECAPSULE,GEN_COL,DCF,AI4DB,DB4AI,ABO,MOD_ABOFEEDBACK,PLDEBUGGER,ADVISOR,SEC,SEC_FE,SEC_LEGER,SEC_POLICY,SEC_SDD,SEC_TDE,COMM_FRAMEWORK,COMM_PROXY,COMM_POOLER,COMM_STATUS,VACUUM,JOB,SPI,NEST_COMPILE,RESOWNER,GSSTACK,LOGICAL_DECODE,GPRC,DISASTER_READ,STANDBY_READ,REPSYNC,SQLPATCH,PARTITION,UBT_NEWPAGE,GPI,GS_DEPENDENCY,LWLOCK,LOCK,UNIQUE_SQL,GLC,SRF,DBLINK,BARRIER_CREATOR,EXRTO_PAGE_P,SEQ_TUP_P,BT_TUP_P,DISPATCH_VERIFY,HBKT,DBE_STATS,DBE_XMLGEN,GS_ILM,GSPERF,EXEC_REMOTE,UBTREE_PARA,BTREE_PARA,ANTI_CACHE,ANTI_RECYCLER,VERIFYLOG,GS_REPAIR,AUTHID,CCINDEX,ONLINE_DDL,MTD,EXRTO_BUFFER,STREAM_PBE,HTAP,UALT,GTM_LITE_READ_S,UGIN)
(1 row)

Controllable modules are identified by uppercase letters, and the special ID ALL is used for setting all module logs. You can control the output of module logs by setting the parameter to on or off. Enable log output for SSL:

1
2
3
4
5
6
gaussdb=# set logging_module='on(SSL)';
SET
gaussdb=# show logging_module;                                                                                                                                              logging_module                                               
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
ALL,on(SSL),off(COMMAND,DFS,GUC,GSCLEAN,HDFS,ORC,SLRU,MEM_CTL,AUTOVAC,CACHE,ADIO,SSL,GDS,TBLSPC,WLM,OBS,INDEX,EXECUTOR,OPFUSION,GPC,GSC,VEC_EXECUTOR,STREAM,LLVM,OPT,OPT_REWRITE,CBOPT_REWRITE,OPT_JOIN,OPT_AGG,OPT_CHOICE,OPT_SUBPLAN,OPT_SETOP,OPT_SKEW,OPT_PLANNER,OPT_STAT_EXT,SPM,SPM_KEY_FLOW,UDF,COOP_ANALYZE,WLMCP,ACCELERATE,PLANHINT,PARQUET,PGSTAT,CARBONDATA,SNAPSHOT,XACT,HANDLE,CLOG,EC,REMOTE,CN_RETRY,PLSQL,TEXTSEARCH,SEQ,REDO,FUNCTION,PARSER,INSTR,WDR_SNAPSHOT,WDR_REPORT,ASP_REPORT,INCRE_CKPT,INCRE_BG_WRITER,DBL_WRT,RTO_RPO,HEARTBEAT,COMM_IPC,COMM_PARAM,TIMESERIES,SCHEMA,GTT,SEGMENT_PAGE,LIGHTPROXY,HOTKEY,THREAD_POOL,OPT_AI,WALRECEIVER,USTORE,UPAGE,UBTREE,UNDO,TIMECAPSULE,GEN_COL,DCF,AI4DB,DB4AI,ABO,MOD_ABOFEEDBACK,PLDEBUGGER,ADVISOR,SEC,SEC_FE,SEC_LEGER,SEC_POLICY,SEC_SDD,SEC_TDE,COMM_FRAMEWORK,COMM_PROXY,COMM_POOLER,COMM_STATUS,VACUUM,JOB,SPI,NEST_COMPILE,RESOWNER,GSSTACK,LOGICAL_DECODE,GPRC,DISASTER_READ,STANDBY_READ,REPSYNC,SQLPATCH,PARTITION,UBT_NEWPAGE,GPI,GS_DEPENDENCY,LWLOCK,LOCK,UNIQUE_SQL,GLC,SRF,DBLINK,BARRIER_CREATOR,EXRTO_PAGE_P,SEQ_TUP_P,BT_TUP_P,DISPATCH_VERIFY,HBKT,DBE_STATS,DBE_XMLGEN,GS_ILM,GSPERF,EXEC_REMOTE,UBTREE_PARA,BTREE_PARA,ANTI_CACHE,ANTI_RECYCLER,VERIFYLOG,GS_REPAIR,AUTHID,CCINDEX,ONLINE_DDL,MTD,EXRTO_BUFFER,STREAM_PBE,HTAP,UALT,GTM_LITE_READ_S,UGIN)
(1 row)

SSL log output is enabled.

The ALL identifier can be used to quickly enable or disable log output for all modules.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
gaussdb=# set logging_module='off(ALL)';
SET
gaussdb=# show logging_module;                                                                                                                                                logging_module                                              
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
ALL,on(),off(COMMAND,DFS,GUC,GSCLEAN,HDFS,ORC,SLRU,MEM_CTL,AUTOVAC,CACHE,ADIO,SSL,GDS,TBLSPC,WLM,OBS,INDEX,EXECUTOR,OPFUSION,GPC,GSC,VEC_EXECUTOR,STREAM,LLVM,OPT,OPT_REWRITE,CBOPT_REWRITE,OPT_JOIN,OPT_AGG,OPT_CHOICE,OPT_SUBPLAN,OPT_SETOP,OPT_SKEW,OPT_PLANNER,OPT_STAT_EXT,SPM,SPM_KEY_FLOW,UDF,COOP_ANALYZE,WLMCP,ACCELERATE,PLANHINT,PARQUET,PGSTAT,CARBONDATA,SNAPSHOT,XACT,HANDLE,CLOG,EC,REMOTE,CN_RETRY,PLSQL,TEXTSEARCH,SEQ,REDO,FUNCTION,PARSER,INSTR,WDR_SNAPSHOT,WDR_REPORT,ASP_REPORT,INCRE_CKPT,INCRE_BG_WRITER,DBL_WRT,RTO_RPO,HEARTBEAT,COMM_IPC,COMM_PARAM,TIMESERIES,SCHEMA,GTT,SEGMENT_PAGE,LIGHTPROXY,HOTKEY,THREAD_POOL,OPT_AI,WALRECEIVER,USTORE,UPAGE,UBTREE,UNDO,TIMECAPSULE,GEN_COL,DCF,AI4DB,DB4AI,ABO,MOD_ABOFEEDBACK,PLDEBUGGER,ADVISOR,SEC,SEC_FE,SEC_LEGER,SEC_POLICY,SEC_SDD,SEC_TDE,COMM_FRAMEWORK,COMM_PROXY,COMM_POOLER,COMM_STATUS,VACUUM,JOB,SPI,NEST_COMPILE,RESOWNER,GSSTACK,LOGICAL_DECODE,GPRC,DISASTER_READ,STANDBY_READ,REPSYNC,SQLPATCH,PARTITION,UBT_NEWPAGE,GPI,GS_DEPENDENCY,LWLOCK,LOCK,UNIQUE_SQL,GLC,SRF,DBLINK,BARRIER_CREATOR,EXRTO_PAGE_P,SEQ_TUP_P,BT_TUP_P,DISPATCH_VERIFY,HBKT,DBE_STATS,DBE_XMLGEN,GS_ILM,GSPERF,EXEC_REMOTE,UBTREE_PARA,BTREE_PARA,ANTI_CACHE,ANTI_RECYCLER,VERIFYLOG,GS_REPAIR,AUTHID,CCINDEX,ONLINE_DDL,MTD,EXRTO_BUFFER,STREAM_PBE,HTAP,UALT,GTM_LITE_READ_S,UGIN)
(1 row)

gaussdb=# set logging_module='on(ALL)';
SET
gaussdb=# show logging_module;                                                                                                                                               logging_module                                              
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
ALL,on(COMMAND,DFS,GUC,GSCLEAN,HDFS,ORC,SLRU,MEM_CTL,AUTOVAC,CACHE,ADIO,SSL,GDS,TBLSPC,WLM,OBS,INDEX,EXECUTOR,OPFUSION,GPC,GSC,VEC_EXECUTOR,STREAM,LLVM,OPT,OPT_REWRITE,CBOPT_REWRITE,OPT_JOIN,OPT_AGG,OPT_CHOICE,OPT_SUBPLAN,OPT_SETOP,OPT_SKEW,OPT_PLANNER,OPT_STAT_EXT,SPM,SPM_KEY_FLOW,UDF,COOP_ANALYZE,WLMCP,ACCELERATE,PLANHINT,PARQUET,PGSTAT,CARBONDATA,SNAPSHOT,XACT,HANDLE,CLOG,EC,REMOTE,CN_RETRY,PLSQL,TEXTSEARCH,SEQ,REDO,FUNCTION,PARSER,INSTR,WDR_SNAPSHOT,WDR_REPORT,ASP_REPORT,INCRE_CKPT,INCRE_BG_WRITER,DBL_WRT,RTO_RPO,HEARTBEAT,COMM_IPC,COMM_PARAM,TIMESERIES,SCHEMA,GTT,SEGMENT_PAGE,LIGHTPROXY,HOTKEY,THREAD_POOL,OPT_AI,WALRECEIVER,USTORE,UPAGE,UBTREE,UNDO,TIMECAPSULE,GEN_COL,DCF,AI4DB,DB4AI,ABO,MOD_ABOFEEDBACK,PLDEBUGGER,ADVISOR,SEC,SEC_FE,SEC_LEGER,SEC_POLICY,SEC_SDD,SEC_TDE,COMM_FRAMEWORK,COMM_PROXY,COMM_POOLER,COMM_STATUS,VACUUM,JOB,SPI,NEST_COMPILE,RESOWNER,GSSTACK,LOGICAL_DECODE,GPRC,DISASTER_READ,STANDBY_READ,REPSYNC,SQLPATCH,PARTITION,UBT_NEWPAGE,GPI,GS_DEPENDENCY,LWLOCK,LOCK,UNIQUE_SQL,GLC,SRF,DBLINK,BARRIER_CREATOR,EXRTO_PAGE_P,SEQ_TUP_P,BT_TUP_P,DISPATCH_VERIFY,HBKT,DBE_STATS,DBE_XMLGEN,GS_ILM,GSPERF,EXEC_REMOTE,UBTREE_PARA,BTREE_PARA,ANTI_CACHE,ANTI_RECYCLER,VERIFYLOG,GS_REPAIR,AUTHID,CCINDEX,ONLINE_DDL,MTD,EXRTO_BUFFER,STREAM_PBE,HTAP,UALT,GTM_LITE_READ_S,UGIN),off()
(1 row)

Setting suggestion: Enable the log printing function of the corresponding module as required. You are advised not to enable the log printing function for all modules (that is, set this parameter to 'on(ALL)').

Risks and impacts of improper settings: If this parameter is enabled, a large number of logs related to the corresponding module may be printed, affecting system performance.

opfusion_debug_mode

Parameter description: Checks whether simple queries are optimized for debugging. If this parameter is set to log, you can view the specific reasons why queries are not optimized in the database node execution plans. This parameter can be set at the PDB level.

Value type: enumerated type.

Unit: None

Value range:

  • off: This function is disabled.
  • log: This function is enabled. You can check reasons why queries are not optimized in the database node execution plan.

To view the reasons why queries are not optimized in the log, set the parameter to log, log_min_messages to debug4, and logging_module to 'on(OPFUSION)'. Note that a large number of log messages may be generated. Therefore, execute only a small number of jobs during debugging.

Default value: off. In the PDB scenario, if this parameter is not set, the global settings will apply.

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

enable_debug_vacuum

Parameter description: Specifies whether to allow output of some VACUUM-related logs for problem locating. This parameter is used only by developers. Common users are advised not to use it.

Parameter type: Boolean

Unit: None

Value range:

  • on: enabled.
  • off: disabled.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

enable_err_stack

Parameter description: Specifies whether to print stack information for errors whose ACTION is "Contact Huawei technical support."

Parameter type: Boolean

Unit: None

Value range:

  • on: enabled.
  • off: disabled.

Default value: on

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.

enable_show_err_code

Parameter description: Specifies whether to display error codes for front-end connections such as gsql.

Parameter type: Boolean

Unit: None

Value range:

  • on: enabled.
  • off: disabled.

Default value: off

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after you fully understand the parameter meaning and test the parameter.