Postgresql 中文操作指南

O.1. recovery.conf file merged into postgresql.conf #

PostgreSQL 11 及更低版本使用名为 recovery.conf 的配置文件来管理副本和备用服务器。此文件的支持已在 PostgreSQL 12 中删除。有关此更改的详情,请参阅 the release notes for PostgreSQL 12

PostgreSQL 11 and below used a configuration file named recovery.conf to manage replicas and standbys. Support for this file was removed in PostgreSQL 12. See the release notes for PostgreSQL 12 for details on this change.

在 PostgreSQL 12 及更高版本中,使用 normal server configuration parameters 配置 archive recovery, streaming replication, and PITR。它们在 postgresql.conf 中或通过 ALTER SYSTEM 设置,与任何其他参数类似。

On PostgreSQL 12 and above, archive recovery, streaming replication, and PITR are configured using normal server configuration parameters. These are set in postgresql.conf or via ALTER SYSTEM like any other parameter.

如果存在 recovery.conf,服务器将不会启动。

The server will not start if a recovery.conf exists.

在 PostgreSQL 15 及更低版本中有一个设置 promote_trigger_file,或在版本 12 之前有一个设置 trigger_file。相应地使用 pg_ctl promote 或调用 pg_promote() 来提升备用。

PostgreSQL 15 and below had a setting promote_trigger_file, or trigger_file before 12. Use pg_ctl promote or call pg_promote() to promote a standby instead.

standby_mode 设置已删除。数据目录中的 standby.signal 文件已成为替代方案。有关详情,请参阅 Standby Server Operation

The standby_mode setting has been removed. A standby.signal file in the data directory is used instead. See Standby Server Operation for details.