Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit64d64a0

Browse files
committed
Fix upper limit of superuser_reserved_connections, add limit for wal_senders
Should be limited to the maximum number of connections excludingautovacuum workers, not including.Add similar check for max_wal_senders, which should never be higher thanmax_connections.
1 parent2bf6e8c commit64d64a0

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,12 +1966,16 @@ SET ENABLE_SEQSCAN TO OFF;
19661966
</indexterm>
19671967
<listitem>
19681968
<para>
1969-
Specifies the maximum number of concurrent connections from standby
1970-
servers or streaming base backup clients (i.e., the maximum number of
1971-
simultaneously running WAL sender
1972-
processes). The default is zero. This parameter can only be set at
1973-
server start. <varname>wal_level</> must be set to <literal>archive</>
1974-
or <literal>hot_standby</> to allow connections from standby servers.
1969+
Specifies the maximum number of concurrent connections from
1970+
standby servers or streaming base backup clients (i.e., the
1971+
maximum number of simultaneously running WAL sender
1972+
processes). The default is zero, meaning replication is
1973+
disabled. WAL sender processes count towards the total number
1974+
of connections, so the parameter cannot be set higher than
1975+
<xref linkend="guc-max-connections">. This parameter can only
1976+
be set at server start. <varname>wal_level</> must be set
1977+
to <literal>archive</> or <literal>hot_standby</> to allow
1978+
connections from standby servers.
19751979
</para>
19761980
</listitem>
19771981
</varlistentry>

‎src/backend/postmaster/postmaster.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,16 @@ PostmasterMain(int argc, char *argv[])
731731
/*
732732
* Check for invalid combinations of GUC settings.
733733
*/
734-
if (ReservedBackends >=MaxBackends)
734+
if (ReservedBackends >=MaxConnections)
735735
{
736736
write_stderr("%s: superuser_reserved_connections must be less than max_connections\n",progname);
737737
ExitPostmaster(1);
738738
}
739+
if (max_wal_senders >=MaxConnections)
740+
{
741+
write_stderr("%s: max_wal_senders must be less than max_connections\n",progname);
742+
ExitPostmaster(1);
743+
}
739744
if (XLogArchiveMode&&wal_level==WAL_LEVEL_MINIMAL)
740745
ereport(ERROR,
741746
(errmsg("WAL archival (archive_mode=on) requires wal_level \"archive\" or \"hot_standby\"")));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp