如何在数据目录之外存储postgresql.conf?

我使用 these steps在Postgresql 9.4上设置数据库复制.

但是,当使用pg_basebackup时,我的整个数据库目录都会被复制,包括postgresql.conf文件.但是,对于主服务器和从服务器,该文件是不同的,因此在开始复制后将更改更改.

如何使用自定义数据目录运行Postgresql,但是在该目录之外使用postgresql.conf?

我正在使用CentOS7.

使用–write-recovery-conf设置备用服务器.
--write-recovery-conf
       Write a minimal recovery.conf in the output directory (or into the
       base archive file when using tar format) to ease setting up a
       standby server. The recovery.conf file will record the connection
       settings and,if specified,the replication slot that pg_basebackup
       is using,so that the streaming replication will use the same
       settings later on.

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...