From 67d9d3350c8a844bd4cf3c2bc5496739b6c8ed8a Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 17 Jul 2020 13:27:14 -0400 Subject: [PATCH] Update recovery.conf in user guide for PostgreSQL >= 12. The postgresql.auto.conf file was being used instead of recovery.conf, but there were still instances in the text that used recovery.conf. Update to postgresql.auto.conf for PostgreSQL >= 10 and change wording where needed. --- doc/xml/user-guide.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index 750eecc1b..2bfe99e8c 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -146,8 +146,9 @@ /var/lib/pgsql/{[pg-version]}/pgstartup.log - {[pg-path]}/recovery.conf - {[pg-path]}/postgresql.auto.conf + recovery.conf + postgresql.auto.conf + {[pg-path]}/{[pg-recovery-file-demo]} pg_switch_xlog @@ -1983,7 +1984,7 @@

Now the restore can be performed with time-based recovery to bring back the missing table.

- Stop <postgres/>, restore the {[postgres-cluster-demo]} cluster to <id>{[time-recovery-timestamp]}</id>, and display <file>recovery.conf</file> + Stop <postgres/>, restore the {[postgres-cluster-demo]} cluster to <id>{[time-recovery-timestamp]}</id>, and display <file>{[pg-recovery-file-demo]}</file> {[pg-cluster-stop]} @@ -2000,12 +2001,12 @@ - cat {[postgres-recovery-demo]} + cat {[pg-recovery-path-demo]} recovery_target_time -

The recovery.conf file has been automatically generated by so can be started immediately. Once has finished recovery the table will exist again and can be queried.

+

has automatically generated the recovery settings in {[pg-recovery-file-demo]} so can be started immediately. Once has finished recovery the table will exist again and can be queried.

Start <postgres/> and check that the important table exists @@ -2797,7 +2798,7 @@ - cat {[postgres-recovery-demo]} + cat {[pg-recovery-path-demo]} @@ -2986,11 +2987,11 @@ - cat {[postgres-recovery-demo]} + cat {[pg-recovery-path-demo]} - The primary_conninfo setting has been written into the recovery.conf file. Configuring recovery settings in means that the recovery.conf file does not need to be stored elsewhere since it will be properly recreated with each restore. The {[dash]}-type=preserve option can be used with the restore to leave the existing recovery.conf file in place if that behavior is preferred. + The primary_conninfo setting has been written into the {[pg-recovery-file-demo]} file because it was configured as a recovery-option in {[project-exe]}.conf. The {[dash]}-type=preserve option can be used with the restore to leave the existing {[pg-recovery-file-demo]} file in place if that behavior is preferred.

By default {[user-guide-os]} stores the postgresql.conf file in the data directory. That means the change made to postgresql.conf was overwritten by the last restore and the hot_standby setting must be enabled again. Other solutions to this problem are to store the postgresql.conf file elsewhere or to enable the hot_standby setting on the {[host-pg1]} host where it will be ignored.