On Fri, 04 Mar 2022 at 14:05, Kyotaro Horiguchi <[email protected]> wrote:
> At Fri, 04 Mar 2022 12:18:29 +0800, Japin Li <[email protected]> wrote in
>>
>> On Thu, 03 Mar 2022 at 12:10, Japin Li <[email protected]> wrote:
>>
>> Attach v3 patch to fix missing close varname tag.
>
> + A precondition for using minimal WAL is to disable WAL archiving and
> + streaming replication by setting <xref
> linkend="guc-max-wal-senders"/>
> + to <literal>0</literal>, and <varname>archive_mode</varname>
> + to <literal>off</literal>.
>
> It is a bit odd that the features to stop and the corresponding GUCs
> are written irrespectively. It would be better they're in the same
> order.
>
Thanks for your review. Modified.
> + servers. If setting <varname>max_wal_senders</varname> to
> + <literal>0</literal> consider also reducing the amount of WAL
> produced
> + by changing <varname>wal_level</varname> to
> <literal>minimal</literal>.
>
> Those who anively follow this suggestion may bump into failure when
> arhive_mode is on. Thus archive_mode is also worth referred to. But,
> anyway, IMHO, it is mere a performance tips that is not necessarily
> required in this section, or even in this documentaiotn. Addtion to
> that, if we write this for max_wal_senders, archive_mode will deserve
> the similar tips but I think it is too verbose. In short, I think I
> would not add that description at all.
>
It already has a tip about wal_level for archive_mode [1], IIUC.
archive_mode cannot be enabled when wal_level is set to minimal.
[1]
https://www.postgresql.org/docs/devel/runtime-config-wal.html#GUC-ARCHIVE-MODE
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 7ed8c82a9d..a70adb7030 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2775,6 +2775,10 @@ include_dir 'conf.d'
<literal>minimal</literal> makes any base backups taken before
unavailable for archive recovery and standby server, which may
lead to data loss.
+ A precondition for using minimal WAL is to disable WAL archiving and
+ streaming replication by setting <varname>archive_mode</varname> to
+ <literal>off</literal>, and <xref linkend="guc-max-wal-senders"/> to
+ <literal>0</literal>.
</para>
<para>
In <literal>logical</literal> level, the same information is logged as
@@ -3535,6 +3539,7 @@ include_dir 'conf.d'
mode. In <literal>always</literal> mode, all files restored from the archive
or streamed with streaming replication will be archived (again). See
<xref linkend="continuous-archiving-in-standby"/> for details.
+ The default value is <literal>off</literal>.
</para>
<para>
This parameter can only be set at server start.
@@ -4096,7 +4101,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
reconnect. This parameter can only be set at server start. Also,
<varname>wal_level</varname> must be set to
<literal>replica</literal> or higher to allow connections from standby
- servers.
+ servers. If setting <varname>max_wal_senders</varname> to
+ <literal>0</literal> consider also reducing the amount of WAL produced
+ by changing <varname>wal_level</varname> to <literal>minimal</literal>.
</para>
<para>