Skip to content

Commit

Permalink
Update references to recovery.conf.
Browse files Browse the repository at this point in the history
Update references to recovery.conf to include postgresql.auto.conf used in newer versions.

Also update a broken recovery URL and point it to the current version (with a hint to select the proper version of PostgreSQL).
  • Loading branch information
dwsteele committed Feb 15, 2024
1 parent 273d505 commit 6835178
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
16 changes: 16 additions & 0 deletions doc/xml/release/2024/2.51.xml
Expand Up @@ -25,4 +25,20 @@
</release-item>
</release-improvement-list>
</release-core-list>

<release-doc-list>
<release-improvement-list>
<release-item>
<github-pull-request id="2281"/>

<release-item-contributor-list>
<release-item-ideator id="stephen.frost"/>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="stefan.fercot"/>
</release-item-contributor-list>

<p>Update references to <file>recovery.conf</file>.</p>
</release-item>
</release-improvement-list>
</release-doc-list>
</release>
14 changes: 8 additions & 6 deletions src/build/help/help.xml
Expand Up @@ -1608,14 +1608,16 @@
</config-key>

<config-key id="recovery-option" name="Recovery Option">
<summary>Set an option in <file>recovery.conf</file>.</summary>
<summary>Set an option in <file>postgresql.auto.conf</file> or <file>recovery.conf</file>.</summary>

<text>
<p>See http://www.postgresql.org/docs/X.X/static/recovery-config.html for details on recovery.conf options (replace X.X with your <postgres/> version). This option can be used multiple times.</p>
<p>See <link url="https://www.postgresql.org/docs/current/runtime-config.html">Server Configuration</link> for details on <file>postgresql.auto.conf</file> or <file>recovery.conf</file> options (be sure to select your <postgres/> version). This option can be used multiple times.</p>

<p>For <postgres/> &gt;= 12, options will be written into <file>postgresql.auto.conf</file>. For all other versions, options will be written into <file>recovery.conf</file>.</p>

<admonition type="note">The <setting>restore_command</setting> option will be automatically generated but can be overridden with this option. Be careful about specifying your own <setting>restore_command</setting> as <backrest/> is designed to handle this for you. Target Recovery options (recovery_target_name, recovery_target_time, etc.) are generated automatically by <backrest/> and should not be set with this option.</admonition>

<p>Since <backrest/> does not start <postgres/> after writing the <file>recovery.conf</file> file, it is always possible to edit/check <file>recovery.conf</file> before manually restarting.</p>
<p>Since <backrest/> does not start <postgres/> after writing the <file>postgresql.auto.conf</file> or <file>recovery.conf</file> file, it is always possible to edit/check <file>postgresql.auto.conf</file> or <file>recovery.conf</file> before manually restarting.</p>
</text>

<example>primary_conninfo=db.mydomain.com</example>
Expand Down Expand Up @@ -2432,9 +2434,9 @@
<list-item><id>name</id> - recover the restore point specified in <br-option>--target</br-option>.</list-item>
<list-item><id>xid</id> - recover to the transaction id specified in <br-option>--target</br-option>.</list-item>
<list-item><id>time</id> - recover to the time specified in <br-option>--target</br-option>.</list-item>
<list-item><id>preserve</id> - preserve the existing <file>recovery.conf</file> file.</list-item>
<list-item><id>standby</id> - add <setting>standby_mode=on</setting> to <file>recovery.conf</file> file so cluster will start in standby mode.</list-item>
<list-item><id>none</id> - no <file>recovery.conf</file> file is written so <postgres/> will attempt to achieve consistency using WAL segments present in <path>pg_xlog</path>/<path>pg_wal</path>. Provide the required WAL segments or use the <setting>archive-copy</setting> setting to include them with the backup.</list-item>
<list-item><id>preserve</id> - preserve the existing <file>postgresql.auto.conf</file> or <file>recovery.conf</file> file.</list-item>
<list-item><id>standby</id> - add <setting>standby_mode=on</setting> to the <file>postgresql.auto.conf</file> or <file>recovery.conf</file> file so cluster will start in standby mode.</list-item>
<list-item><id>none</id> - no <file>postgresql.auto.conf</file> or <file>recovery.conf</file> file is written so <postgres/> will attempt to achieve consistency using WAL segments present in <path>pg_xlog</path>/<path>pg_wal</path>. Provide the required WAL segments or use the <setting>archive-copy</setting> setting to include them with the backup.</list-item>
</list>

<admonition type="warning">Recovery <br-option>type=none</br-option> should be avoided because the timeline will not be incremented at the end of recovery. This can lead to, for example, <postgres/> attempting to archive duplicate WAL, which will be rejected, and may cause the disk to fill up and result in a <postgres/> panic. In addition, tools like <id>pg_rewind</id> may not work correctly or may cause corruption.</admonition>
Expand Down
3 changes: 2 additions & 1 deletion test/src/module/command/helpTest.c
Expand Up @@ -212,7 +212,8 @@ testRun(void)
" --link-all restore all symlinks [default=n]\n"
" --link-map modify the destination of a symlink\n"
" [current=/link1=/dest1, /link2=/dest2]\n"
" --recovery-option set an option in recovery.conf\n"
" --recovery-option set an option in postgresql.auto.conf or\n"
" recovery.conf\n"
" --set backup set to restore [default=latest]\n"
" --tablespace-map restore a tablespace into the specified\n"
" directory\n"
Expand Down

0 comments on commit 6835178

Please sign in to comment.