{"Entry":{"collection":"guc","key":"log_executor_stats","name":"log_executor_stats","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Statistics / Monitoring","category_zh":"","changed_in":[],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"14","status":"changed","to":"15"}],"content_hash":"87e74036a6d3d936ca9956760ff48a98b5d67b8640dc7cb81234435c3578a4c0","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"off"}],"derived_content_hash":"d8e1cbebc882008d804cc2f752f79351fb8dad5f0f044896ac39d966b6fc9bb1","editorial":{"advice":{"olap":"For a specific analytical statement, EXPLAIN (ANALYZE, BUFFERS) and cumulative views are usually more actionable than cluster-wide log_executor_stats. Scope any use and budget log volume.","oltp":"Do not enable log_executor_stats as normal OLTP tuning. Use it briefly on an isolated reproduction or one controlled session, collect the needed log, then disable it.","small":"Leave log_executor_stats=off. A small host is especially vulnerable to diagnostic log I/O and storage exhaustion."},"mechanism":["log_executor_stats emits executor-stage resource usage for every query using a crude getrusage-style profiler. Output goes to the server log and is intended for short diagnostic sessions.","log_statement_stats reports the total statement, while parser, planner, and executor switches report individual phases. The total switch cannot be enabled together with any per-phase switch.","This is synchronous diagnostic logging rather than the cumulative statistics system. Volume and formatting make it unsuitable as routine production telemetry. Its superuser context permits an authorized session change without a server restart."],"pitfalls":["Enabling or enlarging log_executor_stats without measuring collection and observation overhead.","Confusing collection semantics with a performance-control or I/O-control setting.","Assuming all statistics are immediately current inside a long transaction.","Collecting sensitive query text or identifiers without matching access and retention policy."],"references":[{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["log_statement_stats","log_parser_stats","log_planner_stats","log_min_duration_statement","track_io_timing"],"summary":"log_executor_stats — Writes executor performance statistics to the server log. Observed in PG9.0–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"7.4","group":"Statistics","group_slug":"statistics","imported_at":"2026-09-27T17:57:31.548996+08:00","intro_commit":{},"key":"log_executor_stats","last_version":"20","max_val":"","min_val":"","name":"log_executor_stats","position":226,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:7a685cd8a65a66666469fb01d7385da007650831fbb42bb86132d03a740a0080","receipt_sha256":"efc9d494ac1b350a118b4039bde00146512df56fca86111a7de88402741eb457","repair":"wiki-repair-20261023"},"short_desc":"For each query, output performance statistics of the respective module to the server log.","short_desc_zh":"","source_rev":"wiki-repair-20261023:77fc62b3e03aae3d2b1276424a045a3277087fdf2d9a2de0728bcf27cf6847b9","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"log_executor_stats","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"log_executor_stats","SourceRevision":"wiki-repair-20261023:77fc62b3e03aae3d2b1276424a045a3277087fdf2d9a2de0728bcf27cf6847b9","Facts":{"boot_val":"off","category":"Statistics / Monitoring","context":"superuser","description":"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.","description_zh":"对于每个查询，将各自模块的性能统计输出到服务器日志中。这是一个简单的性能分析工具，类似于 Unix getrusage() 操作系统功能。log_statement_stats 报告整个语句的统计信息，而其他选项报告每个模块的统计信息。log_statement_stats 不能与任何单独模块选项一起启用。所有这些选项默认情况下都是禁用的。只有超级用户和具有适当 SET 权限的用户才能更改这些设置。","description_zh_html":"\u003cp\u003e\n        对于每个查询，将各自模块的性能统计输出到服务器日志中。这是一个简单的性能分析工具，类似于 Unix \u003ccode class=\"function\"\u003egetrusage()\u003c/code\u003e 操作系统功能。\u003ccode class=\"varname\"\u003elog_statement_stats\u003c/code\u003e 报告整个语句的统计信息，而其他选项报告每个模块的统计信息。\u003ccode class=\"varname\"\u003elog_statement_stats\u003c/code\u003e 不能与任何单独模块选项一起启用。所有这些选项默认情况下都是禁用的。只有超级用户和具有适当 \u003ccode class=\"literal\"\u003eSET\u003c/code\u003e 权限的用户才能更改这些设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-LOG-STATEMENT-STATS","file":"runtime-config-statistics.html","lang":"en","sha256":"90db46d4b011d54f415934fcc658b0841d07af25ae591483c2139ba0e114ed21","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"log_executor_stats","short_desc":"Writes executor performance statistics to the server log.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-statistics.html","sha256":"e652c12bbb8be47104e61d6cde2c9e6d55a0abab5eb2f7eedf64ef2467356274"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"GUC-LOG-STATEMENT-STATS","file":"runtime-config-statistics.html","lang":"en","sha256":"90db46d4b011d54f415934fcc658b0841d07af25ae591483c2139ba0e114ed21","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"log_executor_stats","SourceDatabase":"center","Version":"18","Locale":"en","Title":"log_executor_stats","Summary":"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.","BodyHTML":"\u003cp\u003eFor 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.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:77fc62b3e03aae3d2b1276424a045a3277087fdf2d9a2de0728bcf27cf6847b9","ContentHash":"9a9fb405515762dd9677540a7859ab8511d76b82df4a467d62c5c3d53bf09be9","Payload":{"description":"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."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
