Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#23250] YSQL: UT org.yb.pgsql.TestPgMemoryGC#testPgMemoryGcOrderBy i…
…s failing with connection manager Summary: During the connection setup with postgres, there is a startup message shared with the client, the message contains the details of the backend pid, cipher key. This info is persisted in the client side and can be used to cancel query if needed in the future. With connection manager, the above BackendKeyData packet is intercepted by connection manager and the info is persisted as part of server details. And, the client id info is shared with the client app. Propagating backend pid would not help as the client can be attached to a different backend across queries. So, in the case of connection manager, the connection manager client id is shared with the client app and this same id can be used to cancel the query if needed. As, the pid being shared with connection manager is not the true backend postgres id, I made the change to use `SELECT pg_backend_pid()` instead of `getPgBackendPid(connection)` which fetches the pid persisted in the client side. Follow up tickets for this change are: - Write a UT to test cancel query functionality with connection manager - https://yugabyte.atlassian.net/browse/DB-12241 - Document that the id persisted in JDBC is not the backend pid when connection manager is enabled - https://yugabyte.atlassian.net/browse/DB-12242 Jira: DB-12181 Test Plan: Run the test and check that the test `./yb_build.sh --java-test 'org.yb.pgsql.TestPgMemoryGC#testPgMemoryGcOrderBy'` is working as expected. Run the test and check that the test `./yb_build.sh --enable-ysql-conn-mgr-test --java-test 'org.yb.pgsql.TestPgMemoryGC#testPgMemoryGcOrderBy'` is working as expected. Verify that the cancel query is working with connection manager. Jenkins: test regex: .*TestPgMemoryGC.*, enable connection manager Reviewers: mkumar, rbarigidad, asrinivasan, nkumar, skumar Reviewed By: asrinivasan Differential Revision: https://phorge.dev.yugabyte.com/D36774
- Loading branch information