From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: remove wal_level archive |
Date: | 2016-02-08 12:34:50 |
Message-ID: | CAB7nPqSebuCg5i72RJ1AV=jGBLicqjbzoBb5ONGP-9-SvPyoOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 8, 2016 at 6:47 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 1/26/16 10:56 AM, Simon Riggs wrote:
>> Removing one of "archive" or "hot standby" will just cause confusion and
>> breakage, so neither is a good choice for removal.
>>
>> What we should do is
>> 1. Map "archive" and "hot_standby" to one level with a new name that
>> indicates that it can be used for both/either backup or replication.
>> (My suggested name for the new level is "replica"...)
>> 2. Deprecate "archive" and "hot_standby" so that those will be removed
>> in a later release.
>
> Updated patch to reflect these suggestions.
Shouldn't backup.sgml be updated as well? Here is the portion that I
am referring to:
To enable WAL archiving, set the <xref linkend="guc-wal-level">
configuration parameter to <literal>archive</> or higher,
<xref linkend="guc-archive-mode"> to <literal>on</>,
But minimal WAL does not contain enough information to reconstruct the
- data from a base backup and the WAL logs, so <literal>archive</> or
+ data from a base backup and the WAL logs, so <literal>replica</> or
higher must be used to enable WAL archiving
(<xref linkend="guc-archive-mode">) and streaming replication.
</para>
<para>
- In <literal>hot_standby</> level, the same information is logged as
- with <literal>archive</>, plus information needed to reconstruct
- the status of running transactions from the WAL. To enable read-only
As the paragraph about the difference between hot_standby and archive
is removed, I think that it would be better to mention that setting
wal_level to replica allows to reconstruct data from a base backup and
the WAL logs, *and* to run read-only queries when hot_standby is
enabled.
- if (ControlFile->wal_level < WAL_LEVEL_HOT_STANDBY)
+ if (ControlFile->wal_level < WAL_LEVEL_REPLICA)
Upthread it was mentioned that switching to an approach where enum
values are directly listed would be better. The target of an extra
patch on top of this one?
- if (wal_level < WAL_LEVEL_ARCHIVE)
- ereport(ERROR,
-
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("replication slots can only be
used if wal_level >= archive")));
We should still forbid the creation of replication slots if wal_level = minimal.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2016-02-08 12:41:54 | Re: proposal: schema PL session variables |
Previous Message | Marko Tiikkaja | 2016-02-08 12:22:50 | Re: proposal: schema PL session variables |