Re: Further Hot Standby documentation required

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Further Hot Standby documentation required
Дата
Msg-id 4BDE94A1.4010608@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Further Hot Standby documentation required  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Further Hot Standby documentation required  (Simon Riggs <simon@2ndQuadrant.com>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Scott Bailey
Дата:
Сообщение: Re: Invalidating dependent views and functions
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Further Hot Standby documentation required