Postgres FATAL:无法进行热备份,因为在主服务器上wal_level未设置为“副本”或更高

我正在Linux两个节点上配置postgres 9.6(1个主节点,另一个是从节点) https://www.howtoforge.com/tutorial/how-to-install-and-configure-master-slave-replication-with-postgresql-96-on-centos-7/

按照上面的注释进行了所有配置,从注释进行配置后,主节点正在运行

但是当我启动从属节点并在从属端的日志中看到以下消息时,给出了从属配置表格的注释:

< 2020-03-17 01:12:07.408 +04 > LOG:  database system was interrupted while in recovery at log time 2020-03-17 00:37:30 +04
< 2020-03-17 01:12:07.408 +04 > HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
< 2020-03-17 01:12:07.420 +04 > LOG:  entering standby mode
< 2020-03-17 01:12:07.422 +04 > WARNING:  WAL was generated with wal_level=minimal,data may be missing
< 2020-03-17 01:12:07.422 +04 > HINT:  This happens if you temporarily set wal_level=minimal without taking a new base backup.
< 2020-03-17 01:12:07.422 +04 > FATAL:  hot standby is not possible because wal_level was not set to "replica" or higher on the master server
< 2020-03-17 01:12:07.422 +04 > HINT:  Either set wal_level to "replica" on the master,or turn off hot_standby here.
< 2020-03-17 01:12:07.423 +04 > LOG:  startup process (PID 20755) exited with exit code 1
< 2020-03-17 01:12:07.423 +04 > LOG:  aborting startup due to startup process failure
< 2020-03-17 01:12:07.425 +04 > LOG:  database system is shut down

使用postgres很新,想知道我是否错过了某些内容,或者我注意到的是缺少了某些内容。

有一些Google,但是很遗憾找不到任何东西。

cuterose 回答:Postgres FATAL:无法进行热备份,因为在主服务器上wal_level未设置为“副本”或更高

在进行基本备份时,必须将

wal_level设置为副本或更高版本。看来您将wal_level更改为复制副本为时已晚。丢弃旧的副本,然后再次运行pg_basebackup。

您为什么使用9.6?如果您只是第一次进行设置,则应该使用最新的稳定版本12。

本文链接:https://www.f2er.com/2635676.html

大家都在问