Re: Further Hot Standby documentation required

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Further Hot Standby documentation required
Date: 2010-05-03 09:17:21
Message-ID: 4BDE94A1.4010608@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Simon Riggs wrote:
>> * wal_level = 'hot_standby' doesn't mention that the second parameter
>> also needs to be set, nor is there a xref.

Fixed.

>> * wal_level doesn't describe what the impacts are on a standby if the
>> level is changed on the primary, nor is there a caution or a warning of
>> any kind. For example, if a standby is setup with hot_standby = on and
>> the primary is set wal_level = archive, does the standby start working
>> if the primary changes wal_level = hot_standby? What happens if the
>> primary is set wal_level = hot_standby and is then changed to archive?

Hmm, feels like it should rather be documented in the hot_standby
setting, it affects the standby not the master after all. How about this:

--- config.sgml 2 May 2010 11:32:53 -0000 1.274
+++ config.sgml 3 May 2010 09:06:19 -0000
@@ -1931,6 +1933,19 @@
<para>
Specifies whether or not you can connect and run queries during
recovery, as described in <xref linkend="hot-standby">.
+ </para>
+ <para>
+ Hot Standby requires <xref linkend="guc-wal-level"> to be set
+ to <literal>hot_standby</> in the primary server. If it was not
+ while the WAL being replayed was generated, and
+ <varname>hot_standby</> is set to <literal>on</>, the server will
+ refuse to start up. Also, if <varname>wal_level</> is changed on
+ the primary server while a standby is active in hot standby
mode, and
+ the primary server is restarted for the setting to take effect, the
+ standby will shut down as soon as it sees the checkpoint record
+ generated at the restart of the primary server.
+ </para>
+ <para>
The default value is <literal>off</literal>.
This parameter can only be set at server start. It only has effect
during archive recovery or in standby mode.

>> * wal_level doesn't explicitly describe that the levels are in sequence
>> and that hot_standby is a superset of archive.

It does say:
"The default value is <literal>minimal</>, which writes only the
information needed to recover from a crash or immediate shutdown.
<literal>archive</> adds logging required for WAL archiving, and
<literal>hot_standby</> further adds information required to run
read-only queries on a standby server."

Want to propose a better wording?

> I totally agree. Also, there is the new requirement to set wal_level
> for PITR, which is not documented as a necessary setup step yet.

Fixed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-05-03 09:50:53 Re: Further Hot Standby documentation required
Previous Message Scott Bailey 2010-05-03 04:27:03 Re: Invalidating dependent views and functions