diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 15 | ||||
-rw-r--r-- | src/backend/utils/init/postinit.c | 2 | ||||
-rw-r--r-- | src/backend/utils/misc/guc.c | 5 |
3 files changed, 10 insertions, 12 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index f3ddf828bbe..660f3185e6b 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -202,9 +202,9 @@ char *ListenAddresses; /* * ReservedBackends is the number of backends reserved for superuser use. - * This number is taken out of the pool size given by MaxBackends so + * This number is taken out of the pool size given by MaxConnections so * number of backend slots available to non-superusers is - * (MaxBackends - ReservedBackends). Note what this really means is + * (MaxConnections - ReservedBackends). Note what this really means is * "if there are <= ReservedBackends connections available, only superusers * can make new connections" --- pre-existing superuser connections don't * count against the limit. @@ -882,14 +882,11 @@ PostmasterMain(int argc, char *argv[]) /* * Check for invalid combinations of GUC settings. */ - if (ReservedBackends >= MaxConnections) + if (ReservedBackends + max_wal_senders >= MaxConnections) { - write_stderr("%s: superuser_reserved_connections must be less than max_connections\n", progname); - ExitPostmaster(1); - } - if (max_wal_senders >= MaxConnections) - { - write_stderr("%s: max_wal_senders must be less than max_connections\n", progname); + write_stderr("%s: superuser_reserved_connections (%d) plus max_wal_senders (%d) must be less than max_connections (%d)\n", + progname, + ReservedBackends, max_wal_senders, MaxConnections); ExitPostmaster(1); } if (XLogArchiveMode > ARCHIVE_MODE_OFF && wal_level == WAL_LEVEL_MINIMAL) diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 484628987f4..d8f45b3c43f 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -778,7 +778,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username, } /* - * The last few connections slots are reserved for superusers. Although + * The last few connection slots are reserved for superusers. Although * replication connections currently require superuser privileges, we * don't allow them to consume the reserved slots, which are intended for * interactive use. diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0c4cc9160d4..a4f9b3668e0 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1873,6 +1873,7 @@ static struct config_int ConfigureNamesInt[] = }, { + /* see max_connections and max_wal_senders */ {"superuser_reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS, gettext_noop("Sets the number of connection slots reserved for superusers."), NULL @@ -2375,7 +2376,7 @@ static struct config_int ConfigureNamesInt[] = }, { - /* see max_connections */ + /* see max_connections and superuser_reserved_connections */ {"max_wal_senders", PGC_POSTMASTER, REPLICATION_SENDING, gettext_noop("Sets the maximum number of simultaneously running WAL sender processes."), NULL @@ -2386,7 +2387,7 @@ static struct config_int ConfigureNamesInt[] = }, { - /* see max_connections */ + /* see max_wal_senders */ {"max_replication_slots", PGC_POSTMASTER, REPLICATION_SENDING, gettext_noop("Sets the maximum number of simultaneously defined replication slots."), NULL |