<para>
If more flexibility in copying the backup files is needed, a lower
level process can be used for standalone hot backups as well.
- To prepare for low level standalone hot backups, set <varname>wal_level</> to
+ To prepare for low level standalone hot backups, make sure
+ <varname>wal_level</> is set to
<literal>replica</> or higher, <varname>archive_mode</> to
<literal>on</>, and set up an <varname>archive_command</> that performs
archiving only when a <emphasis>switch file</> exists. For example:
</term>
<listitem>
<para>
- <varname>wal_level</> determines how much information is written
- to the WAL. The default value is <literal>minimal</>, which writes
- only the information needed to recover from a crash or immediate
- shutdown. <literal>replica</> adds logging required for WAL
- archiving as well as information required to run
- read-only queries on a standby server. Finally,
+ <varname>wal_level</> determines how much information is written to
+ the WAL. The default value is <literal>replica</>, which writes enough
+ data to support WAL archiving and replication, including running
+ read-only queries on a standby server. <literal>minimal</> removes all
+ logging except the information required to recover from a crash or
+ immediate shutdown. Finally,
<literal>logical</> adds information necessary to support logical
decoding. Each level includes the information logged at all lower
levels. This parameter can only be set at server start.
Specifies the maximum number of concurrent connections from
standby servers or streaming base backup clients (i.e., the
maximum number of simultaneously running WAL sender
- processes). The default is zero, meaning replication is
+ processes). The default is 10. The value 0 means replication is
disabled. WAL sender processes count towards the total number
of connections, so the parameter cannot be set higher than
<xref linkend="guc-max-connections">. Abrupt streaming client
<para>
Specifies the maximum number of replication slots
(see <xref linkend="streaming-replication-slots">) that the server
- can support. The default is zero. This parameter can only be set at
+ can support. The default is 10. This parameter can only be set at
server start.
<varname>wal_level</varname> must be set
to <literal>replica</literal> or higher to allow replication slots to
NULL
},
&max_wal_senders,
- 0, 0, MAX_BACKENDS,
+ 10, 0, MAX_BACKENDS,
NULL, NULL, NULL
},
NULL
},
&max_replication_slots,
- 0, 0, MAX_BACKENDS /* XXX? */ ,
+ 10, 0, MAX_BACKENDS /* XXX? */ ,
NULL, NULL, NULL
},
NULL
},
&wal_level,
- WAL_LEVEL_MINIMAL, wal_level_options,
+ WAL_LEVEL_REPLICA, wal_level_options,
NULL, NULL, NULL
},
# - Settings -
-#wal_level = minimal # minimal, replica, or logical
+#wal_level = replica # minimal, replica, or logical
# (change requires restart)
#fsync = on # flush data to disk for crash safety
# (turning this off can cause
# Set these on the master and on any standby that will send replication data.
-#max_wal_senders = 0 # max number of walsender processes
+#max_wal_senders = 10 # max number of walsender processes
# (change requires restart)
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
#wal_sender_timeout = 60s # in milliseconds; 0 disables
-#max_replication_slots = 0 # max number of replication slots
+#max_replication_slots = 10 # max number of replication slots
# (change requires restart)
#track_commit_timestamp = off # collect timestamp of transaction commit
# (change requires restart)
'postgresql.conf', qq{
track_commit_timestamp = on
max_wal_senders = 5
- wal_level = hot_standby
});
$master->start;
$master->backup($bkplabel);
'postgresql.conf', qq{
track_commit_timestamp = on
max_wal_senders = 5
- wal_level = hot_standby
});
$master->start;
$master->backup($bkplabel);
if ($params{allows_streaming})
{
- print $conf "wal_level = replica\n";
print $conf "max_wal_senders = 5\n";
print $conf "wal_keep_segments = 20\n";
print $conf "max_wal_size = 128MB\n";
print $conf "hot_standby = on\n";
print $conf "max_connections = 10\n";
}
+ else
+ {
+ print $conf "wal_level = minimal\n";
+ print $conf "max_wal_senders = 0\n";
+ }
if ($TestLib::windows_os)
{
$node_master->init(allows_streaming => 1);
$node_master->append_conf(
'postgresql.conf', qq(
-max_replication_slots = 4
wal_level = logical
));
$node_master->start;
$node_master->append_conf('postgresql.conf', qq{
fsync = on
-wal_level = replica
wal_log_hints = on
max_prepared_transactions = 5
autovacuum = off