选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

文档 / 系统目录 / 系统视图

SYSTEM VIEW系统视图

pg_settings

参数设置

系统视图 引入 9.0(基线) 现存至 20 devel 1 次结构变更

类别
系统视图
关系 OID
12104
关系类型
v(视图)
字段数
17
引入版本
9.0(收录基线)
版本状态
当前稳定版
结构变更
1 次

PostgreSQL 18 手册 官方文档

版本轨迹

相对 PostgreSQL 17 无变化。

视图pg_settings提供对服务器运行时参数的访问。 它实质上是SHOW和SET命令的替代接口。 它还提供了一些关于每个参数的事实,这些事实无法直接从SHOW中获取,例如最小值和最大值。

字段

PostgreSQL 18 的 17 个字段,按定义顺序排列。说明默认用本站手册的译文,没有译文的按英文原文显示。

字段 类型 说明
name text 运行时配置参数名
setting text 参数的当前值
unit text 参数的隐式单元
category text 参数的逻辑组
short_desc text 参数的简短描述
extra_desc text 附加的参数的详细描述
context text 要求设置此参数值的上下文 (参见下方)
vartype text 参数类型 (bool, enum, integer, real,或 string)
source text 当前参数值的来源
min_val text 参数的最小允许值(对非数值参数为空)
max_val text 参数的最大允许值(对非数值参数为空)
enumvals text[] 枚举参数的允许值(对非枚举参数为空)
boot_val text 如果该参数未以其他方式设置,则为服务器启动时假定的参数值
reset_val text 在当前会话中,RESET将会设置的参数值
sourcefile text 设置当前值的配置文件(对于来自配置文件以外来源的值,或者由既不是超级用户也没有 pg_read_all_settings 权限的用户查看时,为 NULL);在配置文件中使用 include 指令时这很有帮助
sourceline integer 当前值在配置文件中设置的行号(对于从配置文件以外的源设置的值为null, 或者当被既不是超级用户也没有pg_read_all_settings权限的用户检查时)。
pending_restart boolean 如果配置文件中修改了该值但需要重启,则为true,否则为false

演化历史

相邻两个大版本之间的差异,新的在前。版本号链到该版的字段表。

  1. PostgreSQL 15 ← 14 仅描述更新

    2 处描述更新
    • sourcefile Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings); helpful when using include directives in configuration files Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges of pg_read_all_settings); helpful when using include directives in configuration files
    • sourceline Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings). Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who neither is a superuser nor has privileges of pg_read_all_settings).
  2. PostgreSQL 10 ← 9.6 仅描述更新

    2 处描述更新
    • sourcefile Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a non-superuser); helpful when using include directives in configuration files Configuration file the current value was set in (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings); helpful when using include directives in configuration files
    • sourceline Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a non-superuser) Line number within the configuration file the current value was set at (null for values set from sources other than configuration files, or when examined by a user who is neither a superuser or a member of pg_read_all_settings).
  3. PostgreSQL 9.5 ← 9.4 结构变更

    pending_restart

  4. PostgreSQL 9.1 ← 9.0 仅描述更新

    1 处描述更新
    • context Context required to set the parameter's value Context required to set the parameter's value (see below)

字段矩阵

每个字段在 18 个收录版本里的存在情况;方格指向该版的字段表。「有变」指类型、可空、隐式或数组维数与上一版不同。

存在 有变 已移除 不存在

字段 9.09.19.29.39.49.59.61011121314151617181920
name 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
setting 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
unit 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
category 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
short_desc 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
extra_desc 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
context 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
vartype 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
source 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
min_val 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
max_val 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
enumvals 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
boot_val 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
reset_val 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
sourcefile 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
sourceline 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在
pending_restart 不存在 不存在 不存在 不存在 不存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在 存在

同类关系

关系 引入 字段 版本变动 最近变更
SYSTEM VIEW 系统视图 39 个
pg_aios 18 15
正在使用的异步 I/O 句柄 现存
pg_available_extension_versions 9.1 10 192 次
扩展的可用版本 现存
pg_available_extensions 9.1 5 191 次
可用的扩展 现存
pg_backend_memory_contexts 14 10 181 次
后端内存上下文 现存
pg_config 9.6 2
编译时配置参数 现存
pg_cursors 9.0基线 6
打开的游标 现存
pg_dsm_registry_allocations 19 3
DSM 注册表跟踪的共享内存分配 现存
pg_file_settings 9.5 7
配置文件内容摘要 现存
pg_group 9.0基线 3
数据库用户组 现存
pg_hba_file_rules 10 11 161 次
客户端认证配置文件内容的摘要 现存
pg_ident_file_mappings 15 7 161 次
客户端用户名映射配置文件内容摘要 现存
pg_indexes 9.0基线 5
索引 现存
pg_locks 9.0基线 16 142 次
当前持有或等待的锁 现存
pg_matviews 9.3 7
物化视图 现存
pg_policies 9.5 8 101 次
策略 现存
pg_prepared_statements 9.0基线 8 162 次
预备语句 现存
pg_prepared_xacts 9.0基线 5
预备事务 现存
pg_publication_sequences 19 3
发布及其关联序列的信息 现存
pg_publication_tables 10 5 151 次
发布及其关联表的信息 现存
pg_replication_origin_status 9.5 4
有关复制源的信息,包括复制进度 现存
pg_replication_slots 9.4 22 199 次
复制槽信息 现存
pg_roles 9.0基线 13 9.52 次
数据库角色 现存
pg_rules 9.0基线 4
规则 现存
pg_seclabels 9.1 8
安全标签 现存
pg_sequences 10 11
序列 现存
pg_settings 9.0基线 17 9.51 次
参数设置 现存
pg_shadow 9.0基线 9 123 次
数据库用户 现存
pg_shmem_allocations 13 4
共享内存分配 现存
pg_shmem_allocations_numa 18 3
共享内存分配的 NUMA 节点映射 现存
pg_stats 9.0基线 19 193 次
规划器统计信息 现存
pg_stats_ext 12 17 193 次
扩展规划器统计信息 现存
pg_stats_ext_exprs 14 22 192 次
表达式的扩展规划器统计信息 现存
pg_tables 9.0基线 8 9.51 次
现存
pg_timezone_abbrevs 9.0基线 3
时区简写 现存
pg_timezone_names 9.0基线 4
时区名称 现存
pg_user 9.0基线 9 123 次
数据库用户 现存
pg_user_mappings 9.0基线 6
用户映射 现存
pg_views 9.0基线 4
视图 现存
pg_wait_events 17 3
等待事件 现存