recovery.conf
文件整合到 postgresql.conf
#
PostgreSQL 11 及以下版本使用配置文件名为 recovery.conf
,以管理复制和备机。
关于此命令的支持在PostgreSQL 12被移除。此变更的详细信息请参见the release notes for PostgreSQL 12。
在PostgreSQL 12 及以上版本,archive recovery, streaming replication, and PITR使用normal server configuration parameters进行配置。
这些在postgresql.conf
中设置或像其他参数一样通过ALTER SYSTEM进行设置。
如果recovery.conf
存在则服务器不会启动。
PostgreSQL 15及以下版本有一个设置
promote_trigger_file
,或者在12之前是
trigger_file
。
使用pg_ctl promote
或调用
pg_promote()
来提升一个备用节点。
The
standby_mode
设置已经被移除。数据目录中的standby.signal
文件用于替代它。详请参见Standby Server Operation。