Re: remove wal_level archive
От | Michael Paquier |
---|---|
Тема | Re: remove wal_level archive |
Дата | |
Msg-id | CAB7nPqSebuCg5i72RJ1AV=jGBLicqjbzoBb5ONGP-9-SvPyoOA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: remove wal_level archive (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: remove wal_level archive
|
Список | pgsql-hackers |
On Mon, Feb 8, 2016 at 6:47 AM, Peter Eisentraut <peter_e@gmx.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
В списке pgsql-hackers по дате отправления: