pgbackrest.git / summary / log / commit / refs

commit    67d9d3350c8a844bd4cf3c2bc5496739b6c8ed8a
Author:   David Steele <david@pgmasters.net>
Date:     Fri Jul 17 17:27:14 2020 +0000

    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 @@ <variable key="postgres-log-pgstartup-demo" if="{[os-type-is-centos]}">/var/lib/pgsql/{[pg-version]}/pgstartup.log</variable> - <variable key="postgres-recovery-demo" if="{[pg-version]} &lt; 12">{[pg-path]}/recovery.conf</variable> - <variable key="postgres-recovery-demo" if="{[pg-version]} &gt;= 12">{[pg-path]}/postgresql.auto.conf</variable> + <variable key="pg-recovery-file-demo" if="{[pg-version]} &lt; 12">recovery.conf</variable> + <variable key="pg-recovery-file-demo" if="{[pg-version]} &gt;= 12">postgresql.auto.conf</variable> + <variable key="pg-recovery-path-demo">{[pg-path]}/{[pg-recovery-file-demo]}</variable> <!-- Select correct WAL switch function based on the version of PostgreSQL --> <variable key="pg-switch-wal" if="{[pg-version]} &lt; 10">pg_switch_xlog</variable> @@ -1983,7 +1984,7 @@ <p>Now the restore can be performed with time-based recovery to bring back the missing table.</p> <execute-list host="{[host-pg1]}"> - <title>Stop <postgres/>, restore the {[postgres-cluster-demo]} cluster to <id>{[time-recovery-timestamp]}</id>, and display <file>recovery.conf</file></title> + <title>Stop <postgres/>, restore the {[postgres-cluster-demo]} cluster to <id>{[time-recovery-timestamp]}</id>, and display <file>{[pg-recovery-file-demo]}</file></title> <execute user="root"> <exe-cmd>{[pg-cluster-stop]}</exe-cmd> @@ -2000,12 +2001,12 @@ </execute> <execute user="postgres" output="y"> - <exe-cmd>cat {[postgres-recovery-demo]}</exe-cmd> + <exe-cmd>cat {[pg-recovery-path-demo]}</exe-cmd> <exe-highlight>recovery_target_time</exe-highlight> </execute> </execute-list> - <p>The <file>recovery.conf</file> file has been automatically generated by <backrest/> so <postgres/> can be started immediately. Once <postgres/> has finished recovery the table will exist again and can be queried.</p> + <p><backrest/> has automatically generated the recovery settings in <file>{[pg-recovery-file-demo]}</file> so <postgres/> can be started immediately. Once <postgres/> has finished recovery the table will exist again and can be queried.</p> <execute-list host="{[host-pg1]}"> <title>Start <postgres/> and check that the important table exists</title> @@ -2797,7 +2798,7 @@ </execute> <execute user="postgres" output="y" filter="n"> - <exe-cmd>cat {[postgres-recovery-demo]}</exe-cmd> + <exe-cmd>cat {[pg-recovery-path-demo]}</exe-cmd> </execute> </execute-list> @@ -2986,11 +2987,11 @@ </execute> <execute user="postgres" output="y" filter="n"> - <exe-cmd>cat {[postgres-recovery-demo]}</exe-cmd> + <exe-cmd>cat {[pg-recovery-path-demo]}</exe-cmd> </execute> </execute-list> - <admonition type="note">The <pg-setting>primary_conninfo</pg-setting> setting has been written into the <file>recovery.conf</file> file. Configuring recovery settings in <backrest/> means that the <file>recovery.conf</file> file does not need to be stored elsewhere since it will be properly recreated with each restore. The <br-setting>{[dash]}-type=preserve</br-setting> option can be used with the <cmd>restore</cmd> to leave the existing <file>recovery.conf</file> file in place if that behavior is preferred.</admonition> + <admonition type="note">The <pg-setting>primary_conninfo</pg-setting> setting has been written into the <file>{[pg-recovery-file-demo]}</file> file because it was configured as a <br-option>recovery-option</br-option> in <file>{[project-exe]}.conf</file>. The <br-setting>{[dash]}-type=preserve</br-setting> option can be used with the <cmd>restore</cmd> to leave the existing <file>{[pg-recovery-file-demo]}</file> file in place if that behavior is preferred.</admonition> <p if="{[os-type-is-centos]}">By default {[user-guide-os]} stores the <file>postgresql.conf</file> file in the <postgres/> data directory. That means the change made to <file>postgresql.conf</file> was overwritten by the last restore and the <pg-option>hot_standby</pg-option> setting must be enabled again. Other solutions to this problem are to store the <file>postgresql.conf</file> file elsewhere or to enable the <pg-option>hot_standby</pg-option> setting on the <host>{[host-pg1]}</host> host where it will be ignored.</p> [parent: 24d2c5b27780]