如何查找PostgreSQL中当前的max_parallel_workers值?

huangapple go评论72阅读模式
英文:

How to find the current max_parallel_workers value in Postgresql?

问题

为了启用并行查询规划,PostgreSQL有许多设置,如 max_parallel_workers 等。在PostgreSQL文档中提到了如何调整这些值,但是我们如何查看这些配置的当前值呢?

英文:

To enable parallel query planning Postgresql has many settings like max_parallel_workers and many more. In Postgresql docs how these values must be tweaked is mentioned, however how can we see the current value of such configurations?

答案1

得分: 7

使用 [`SHOW`][1] 您可以获取许多系统变量和路径的当前值。

    SHOW max_parallel_workers;
    
     max_parallel_workers 
    ----------------------
     8
    (1 行)

也许还有其他有趣的信息...

    SHOW max_worker_processes;
    
     max_worker_processes 
    ----------------------
     8
    (1 行)

对其他变量感到好奇吗?尝试 `SHOW all`。


  [1]: https://www.postgresql.org/docs/9.1/sql-show.html
英文:

Using SHOW you can get the current values of many system variables and paths.

SHOW max_parallel_workers;

 max_parallel_workers 
----------------------
 8
(1 Zeile)

maybe also interesting ..

SHOW max_worker_processes;

 max_worker_processes 
----------------------
 8
(1 Zeile)

Curious about other variables? Try SHOW all.

huangapple
  • 本文由 发表于 2020年1月6日 16:07:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/59608634.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定