【发布时间】:2020-03-16 22:03:37
【问题描述】:
我在 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 很陌生,想知道我是否遗漏了某些东西,或者我关注的笔记遗漏了某些东西。
谷歌了一些,但不幸的是找不到任何东西。
【问题讨论】:
-
在主服务器上运行
show wal_level;会给您带来什么? -
感谢您的快速响应:master 的输出是:-bash-4.2$ psql -c "show wal_level;" wal_level ----------- 副本(1 行)
-
专家您好,请对我所面临的问题有任何帮助。无法克服它。