配置后 Postgres 复制未启动

Postgres replication not starting after configuration

我正在尝试安装和创建 PostgreSQL 主从复制。

配置 postgresql.confpg_hba.conf 后出现问题;我无法使用 systemctl restart postgresql-11.service 重新启动 Postgres。它抱怨

AUTHENTICATING for org.freedesktop.systemd1.manage-units --Authentication is required to manage system services or units

我也无法用 pg_ctl 启动 Postgres,它抱怨

unrecognized configuration parameter checkpoint_segments in file postgresql.conf line 215

postgresql.conf中设置checkpoint_segments=8是不是错了?

如何重新启动 Postgres?

我的postgresql.conf:

wal_level = hot_standby
max_wal_senders = 3
checkpoint_segments = 8
wal_keep_segments = 8
hot_standby = on

请检查您是否有 max_wal_size = 1G 或 max_wal_size = 1GB配置文件。 如果是 1G,您将无法启动该服务。应该是 GB

披露:我为 EnterpriseDB (EDB)

工作

我想 post 它作为至少部分答案,因为这是 unrecognized configuration parameter 错误的原因。

根据 Laurenz's answer,参数 checkpoint_segments 不再存在。替换为 max_wal_size.

此外,确认 Laurenz 在上面所说的内容,“AUTHENTICATING”行与 Postgres 无关。归功于他们,您应该在 Linux 服务中搜索问题。