log_executor_stats
一个配置参数,用于确定是否记录语句的执行器统计信息
log_executor_stats 是一个 配置参数,用于确定是否记录语句的详细执行器统计信息。
log_executor_stats 在 PostgreSQL 7.4 中被添加。
用法
如果 log_executor_stats 被设置为 "on",则会发出一个 DETAIL 行,其中包含有关语句执行的详细信息,包括执行时间和内存/I/O 使用情况。
log_executor_stats 不能与 log_statement_stats 同时启用。
默认值
log_executor_stats 的默认值为:off。
按 PostgreSQL 版本详细信息
log_executor_stats (PostgreSQL 19)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 18)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 17)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 16)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 15)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 14)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 13)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 12)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 11)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 10)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.6)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.5)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
| 需要重启 |
false |
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.4)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.3)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.2)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.1)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 9.0)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 8.4)
| 设置 |
off |
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
| 枚举值 |
|
| 启动值 |
off |
| 重置值 |
off |
| 源文件 |
|
| 源行 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 8.3)
| 设置 |
|
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
文档: log_executor_stats
log_executor_stats (PostgreSQL 8.2)
| 设置 |
|
| 单位 |
|
| 类别 |
统计/监控 |
| 简短描述 |
将执行器性能统计信息写入服务器日志。 |
| 扩展描述 |
|
| 上下文 |
superuser |
| 变量类型 |
bool |
| 来源 |
默认 |
| 最小值 |
|
| 最大值 |
|
文档: log_executor_stats
变更历史
示例
记录执行简单语句(“SELECT 1”)的输出
[2021-03-29 17:54:55 UTC] psql postgres postgres STATEMENT: SELECT 1;
[2021-03-29 17:54:55 UTC] psql postgres postgres LOG: 00000: EXECUTOR STATISTICS
[2021-03-29 17:54:55 UTC] psql postgres postgres DETAIL: ! system usage stats:
! 0.000007 s user, 0.000000 s system, 0.000007 s elapsed
! [0.000618 s user, 0.002449 s system total]
! 14368 kB max resident size
! 0/0 [0/0] filesystem blocks in/out
! 0/0 [0/494] page faults/reclaims, 0 [0] swaps
! 0 [0] signals rcvd, 0/0 [0/0] messages rcvd/sent
! 0/0 [7/0] voluntary/involuntary context switches