Skip to content

Commit 6fda5f1

Browse files
author
Konstantin Knizhnik
committed
Disable dedicated backend for psql
1 parent 4a7b8c9 commit 6fda5f1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/utils/init/postinit.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,11 @@ InitPostgres(const char *in_dbname, Oid dboid,
12771277
* will be interpreted only by connection pooler but then mapped to idle ('I') when
12781278
* forwarded to the client.
12791279
*/
1280-
if (strcmp(application_name, "psql") == 0 || strcmp(application_name, "pg_regress") == 0)
1281-
allow_dedicated_backends = false;
1280+
if (application_name)
1281+
{
1282+
if (strcmp(application_name, "psql") == 0 || strncmp(application_name, "pg_regress", 10) == 0)
1283+
allow_dedicated_backends = false;
1284+
}
12821285
}
12831286

12841287
/*

0 commit comments

Comments
 (0)