diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2017-02-01 17:52:35 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2017-02-01 18:02:43 -0500 |
commit | f1169ab501ce90e035a7c6489013a1d4c250ac92 (patch) | |
tree | 561667bd01bdfb5184853b65bccf1da5e326c1be /src/backend/utils/init/postinit.c | |
parent | aedd554f84bb3cedb32e6e2a954a70537a4da6b9 (diff) |
Don't count background workers against a user's connection limit.
Doing so doesn't seem to be within the purpose of the per user
connection limits, and has particularly unfortunate effects in
conjunction with parallel queries.
Backpatch to 9.6 where parallel queries were introduced.
David Rowley, reviewed by Robert Haas and Albe Laurenz.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r-- | src/backend/utils/init/postinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 21fdc6df6b1..4d0a2a7bed3 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -350,7 +350,7 @@ CheckMyDatabase(const char *name, bool am_superuser) */ if (dbform->datconnlimit >= 0 && !am_superuser && - CountDBBackends(MyDatabaseId) > dbform->datconnlimit) + CountDBConnections(MyDatabaseId) > dbform->datconnlimit) ereport(FATAL, (errcode(ERRCODE_TOO_MANY_CONNECTIONS), errmsg("too many connections for database \"%s\"", |