Skip to content
Permalink
Browse files

Use wal_level=replica in the documentation for PostgreSQL >= 9.6.

The documentation was using wal_level=hot_standby which is a deprecated setting.

Also remove the reference to wal_level=archive since it is no longer supported and is not recommended for older versions.

Suggested by Patrick McLaughlin.
  • Loading branch information...
dwsteele committed Jun 5, 2019
1 parent aca11b2 commit d7bd0c58cdd9a434aa5893db16e6bcf8425e26b9
Showing with 25 additions and 4 deletions.
  1. +17 −0 doc/xml/release.xml
  2. +8 −4 doc/xml/user-guide.xml
@@ -36,6 +36,18 @@
</release-item>
</release-development-list>
</release-core-list>

<release-doc-list>
<release-improvement-list>
<release-item>
<release-item-contributor-list>
<release-item-ideator id="patrick.mclaughlin"/>
</release-item-contributor-list>

<p>Use <setting>wal_level=replica</setting> in the documentation for <postgres/> &amp;ge; 9.6.</p>
</release-item>
</release-improvement-list>
</release-doc-list>
</release>

<release date="2019-05-20" version="2.14" title="Bug Fix and Improvements">
@@ -7309,6 +7321,11 @@
<contributor-id type="github">nj3110</contributor-id>
</contributor>

<contributor id="patrick.mclaughlin">
<contributor-name-display>Patrick McLaughlin</contributor-name-display>
<contributor-id type="github">hitech73</contributor-id>
</contributor>

<contributor id="pritam.barhate">
<contributor-name-display>Pritam Barhate</contributor-name-display>
<contributor-id type="github">pritammobisoft</contributor-id>
@@ -67,6 +67,10 @@
<variable key="pg-version" if="{[os-type-is-centos7]}">{[os-centos7-pg-version]}</variable>
<variable key="pg-version-nodot" eval="y">my $version = '{[pg-version]}'; $version =~ s/\.//g; return $version;</variable>

<!-- WAL level should be the minimum required for replication -->
<variable key="wal-level" if="{[pg-version]} &lt; 9.6">hot_standby</variable>
<variable key="wal-level" if="{[pg-version]} &gt;= 9.6">replica</variable>

<variable key="pg-version-upgrade" if="{[os-type-is-debian]}">11</variable>
<variable key="pg-version-upgrade" if="{[os-type-is-centos6]}">9.6</variable>
<variable key="pg-version-upgrade" if="{[os-type-is-centos7]}">10</variable>
@@ -997,11 +1001,11 @@

<postgres-config-option key="archive_command">'{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} archive-push %p'</postgres-config-option>
<postgres-config-option key="archive_mode">on</postgres-config-option>
<postgres-config-option key="wal_level">hot_standby</postgres-config-option>
<postgres-config-option key="wal_level">{[wal-level]}</postgres-config-option>
<postgres-config-option key="max_wal_senders">3</postgres-config-option>
</postgres-config>

<p>The <pg-option>wal_level</pg-option> setting must be set to <pg-setting>archive</pg-setting> at a minimum but <pg-setting>hot_standby</pg-setting> and <pg-setting>logical</pg-setting> also work fine for backups. Setting <pg-option>wal_level</pg-option> to <pg-setting>hot_standy</pg-setting> and increasing <pg-option>max_wal_senders</pg-option> is a good idea even if you do not currently run a hot standby as this will allow them to be added later without restarting the primary cluster.</p>
<p>Setting <pg-option>wal_level</pg-option> to at least <pg-setting>{[wal-level]}</pg-setting> and increasing <pg-option>max_wal_senders</pg-option> is a good idea even if there are currently no replicas as this will allow them to be added later without restarting the primary cluster.</p>

<p>The <postgres/> cluster must be restarted after making these changes and before performing a backup.</p>

@@ -2672,7 +2676,7 @@
<postgres-config-option key="hot_standby">on</postgres-config-option>
<postgres-config-option key="archive_command">'{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} archive-push %p'</postgres-config-option>
<postgres-config-option key="archive_mode">on</postgres-config-option>
<postgres-config-option key="wal_level">hot_standby</postgres-config-option>
<postgres-config-option key="wal_level">{[wal-level]}</postgres-config-option>
<postgres-config-option key="max_wal_senders">3</postgres-config-option>
<postgres-config-option key="log_filename">'postgresql.log'</postgres-config-option>
<postgres-config-option key="log_line_prefix">''</postgres-config-option>
@@ -3178,7 +3182,7 @@

<postgres-config-option key="archive_command">'{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} archive-push %p'</postgres-config-option>
<postgres-config-option key="archive_mode">on</postgres-config-option>
<postgres-config-option key="wal_level">hot_standby</postgres-config-option>
<postgres-config-option key="wal_level">{[wal-level]}</postgres-config-option>
<postgres-config-option key="max_wal_senders">3</postgres-config-option>
<postgres-config-option key="listen_addresses">'*'</postgres-config-option>
<postgres-config-option key="log_line_prefix">''</postgres-config-option>

0 comments on commit d7bd0c5

Please sign in to comment.
You can’t perform that action at this time.