首页 > 解决方案 > 在 Postgres SQL 中进行并行处理时出现“错误:无法识别的配置参数“max_parallel_workers_per_gather”

问题描述

我的代码

  SET max_parallel_workers_per_gather = 2;

错误

ERROR:  unrecognized configuration parameter "max_parallel_workers_per_gather"

注意- 当我想启用并行处理时使用 Postgres SQL 时,我收到了上述错误。

标签: postgresqlpostgresql-9.1

解决方案


我正在使用 postgresql 9.6 并且没有错误。

我是这样做的:

/etc/postgresql/9.6/main/postgresql.conf以root权限打开取消注释max_parallel_workers_per_gather并相应地设置值。保存它,然后重新启动 postgresql

sudo service postgresql 重启

在 postgresql.conf 内部:-

max_worker_processes = 8               # (change requires restart)
max_parallel_workers_per_gather = 4     # taken from max_worker_processes

推荐阅读