postgresql_16:4.5.9.2 Statistics Monitoring
PostgreSQL 16 > Server Administration > Server Configuration > Run-time Statistics > Statistics Monitoring
compute_query_id (enum)
Enables in-core computation of a query identifier. Query identifiers can be displayed in the pg_stat_activity (see postgresql_16:4.13.2.3) view, using EXPLAIN, or emitted in the log if configured via the (see guc-log-line-prefix) parameter. The (see postgresql_16:9.6.32) extension also requires a query identifier to be computed. Note that an external module can alternatively be used if the in-core query identifier computation method is not acceptable. In this case, in-core computation must be always disabled. Valid values are off (always disabled), on (always enabled), auto, which lets modules such as (see postgresql_16:9.6.32) automatically enable it, and regress which has the same effect as auto, except that the query identifier is not shown in the EXPLAIN output in order to facilitate automated regression testing. The default is auto.
Note
To ensure that only one query identifier is calculated and displayed, extensions that calculate query identifiers should throw an error if a query identifier has already been computed.
log_statement_stats (boolean), log_parser_stats (boolean), log_planner_stats (boolean), log_executor_stats (boolean)
For each query, output performance statistics of the respective module to the server log. This is a crude profiling instrument, similar to the Unix getrusage() operating system facility. log_statement_stats reports total statement statistics, while the others report per-module statistics. log_statement_stats cannot be enabled together with any of the per-module options. All of these options are disabled by default. Only superusers and users with the appropriate SET privilege can change these settings.