From 4e0c743c18bf5435a4850510c5c74b3521c3e1e5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 8 Mar 2018 11:25:26 -0500 Subject: Fix cross-checking of ReservedBackends/max_wal_senders/MaxConnections. We were independently checking ReservedBackends < MaxConnections and max_wal_senders < MaxConnections, but because walsenders aren't allowed to use superuser-reserved connections, that's really the wrong thing. Correct behavior is to insist on ReservedBackends + max_wal_senders being less than MaxConnections. Fix the code and associated documentation. This has been wrong for a long time, but since the situation probably hardly ever arises in the field (especially pre-v10, when the default for max_wal_senders was zero), no back-patch. Discussion: https://postgr.es/m/28271.1520195491@sss.pgh.pa.us --- src/backend/utils/init/postinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/utils/init/postinit.c') 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. -- cgit v1.2.3