Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d25cc0d

Browse files
author
Konstantin Knizhnik
committedJan 26, 2025·
Disable dedicated backends for regression tests
1 parent 015d291 commit d25cc0d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/backend/utils/init/postinit.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,15 @@ InitPostgres(const char *in_dbname, Oid dboid,
12691269
if (!bootstrap)
12701270
CommitTransactionCommand();
12711271

1272-
if (strcmp(application_name, "psql") == 0)
1272+
/*
1273+
* TODO: psql logic and prompt depends on status returned by ReadyForQuery message.
1274+
* So the hack with enforcing dedicated backend by reporting in-transaction status doesn't
1275+
* work in this case.
1276+
* The solution can be to return some special status in ReadyForQuery message which
1277+
* will be interpreted only by connection pooler but then mapped to idle ('I') when
1278+
* forwarded to the client.
1279+
*/
1280+
if (strcmp(application_name, "psql") == 0 || strcmp(application_name, "pg_regress") == 0)
12731281
allow_dedicated_backends = false;
12741282
}
12751283

0 commit comments

Comments
 (0)
Please sign in to comment.