From 9d6db17c8bff093c08a90129d0ba181554b5d3e2 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Tue, 10 Nov 2020 10:51:20 +0800 Subject: [PATCH] Link the old recovery.conf docs chapter to the new docs Add a new docs section for obsolete topics. In it, add a section for the removed recovery.conf documentation. Explain that recovery.conf has been removed in Pg 12 and where to find the replacement configuration. This way when someone running PostgreSQL 12+ searches for "recovery.conf" and finds the /11/ documentation for it, the website docs will have a "latest" link that explains where it went. Right now the docs file just ends, with no link for later versions. This also helps people following /current/ web links from articles, blogs, etc, who would currently get a 404. Appropriate index terms are added to direct searchers to the right place too. --- .../appendix-obsolete-recovery-config.sgml | 61 +++++++++++++++++++ doc/src/sgml/appendix-obsolete.sgml | 19 ++++++ doc/src/sgml/config.sgml | 4 +- doc/src/sgml/filelist.sgml | 4 ++ doc/src/sgml/high-availability.sgml | 16 ++++- doc/src/sgml/postgres.sgml | 1 + doc/src/sgml/ref/pg_basebackup.sgml | 5 +- 7 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 doc/src/sgml/appendix-obsolete-recovery-config.sgml create mode 100644 doc/src/sgml/appendix-obsolete.sgml diff --git a/doc/src/sgml/appendix-obsolete-recovery-config.sgml b/doc/src/sgml/appendix-obsolete-recovery-config.sgml new file mode 100644 index 0000000000..98e4b2711d --- /dev/null +++ b/doc/src/sgml/appendix-obsolete-recovery-config.sgml @@ -0,0 +1,61 @@ + + + + + The <filename>recovery.conf</filename> file + + + obsolete + recovery.conf + + + + PostgreSQL 11 and below used a configuration file named + recovery.conf + 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. + + + + 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. + + + + The server will not start if a recovery.conf exists. + + + + The + trigger_file + + trigger_file + promote_trigger_file + + setting has been renamed to + + + + + The + standby_mode + + standby_mode + standby.signal + + setting has been removed. A standby.signal file in the data directory + is used instead. See for details. + + + diff --git a/doc/src/sgml/appendix-obsolete.sgml b/doc/src/sgml/appendix-obsolete.sgml new file mode 100644 index 0000000000..deebbd083d --- /dev/null +++ b/doc/src/sgml/appendix-obsolete.sgml @@ -0,0 +1,19 @@ + + + + Obsolete or renamed features, settings and files + + + obsolete + + + + Functionality is sometimes removed from PostgreSQL or documentation for it + moves to different places. This section directs users coming from old + versions of the documentation or from external links to the appropriate + new location for the information they need. + + + &obsolete-recovery-config; + + diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index f043433e31..8148b19790 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4227,7 +4227,9 @@ ANY num_sync ( standby server + that is to receive replication data. Their values on the primary server are irrelevant. diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 38e8aa0bbf..aa1a39eedc 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -185,3 +185,7 @@ + + + + diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 19d7bd2b28..3cce684873 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -613,9 +613,17 @@ protocol to make nodes agree on a serializable transactional order. - + Standby Server Operation + + A server enters standby mode if a + + standby.signal + standby.signal + file exists in the data directory when the server is started. + + In standby mode, the server continuously applies WAL received from the primary server. The standby server can read WAL from a WAL archive @@ -689,7 +697,8 @@ protocol to make nodes agree on a serializable transactional order. To set up the standby server, restore the base backup taken from primary server (see ). Create a file - standby.signal in the standby's cluster data + standby.signalstandby.signal + in the standby's cluster data directory. Set to a simple command to copy files from the WAL archive. If you plan to have multiple standby servers for high availability purposes, make sure that recovery_target_timeline is set to @@ -2075,7 +2084,8 @@ if (!triggered) If hot_standby is on in postgresql.conf - (the default value) and there is a standby.signal + (the default value) and there is a + standby.signalstandby.signalfor hot standby file present, the server will run in Hot Standby mode. However, it may take some time for Hot Standby connections to be allowed, because the server will not accept connections until it has completed diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 730d5fdc34..d453be3909 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -289,6 +289,7 @@ break is not needed in a wider output rendering. &acronyms; &glossary; &color; + &obsolete; diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml index e993e8761c..48902066d6 100644 --- a/doc/src/sgml/ref/pg_basebackup.sgml +++ b/doc/src/sgml/ref/pg_basebackup.sgml @@ -198,7 +198,10 @@ PostgreSQL documentation - Creates a standby.signal file and appends + Creates a + standby.signal + standby.signalpg_basebackup --write-recovery-conf + file and appends connection settings to the postgresql.auto.conf file in the target directory (or within the base archive file when using tar format). This eases setting up a standby server using the -- 2.26.2