Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22816] YSQL: Bug fixes for replication connections in ysql connecti…
…on manager Summary: Odyssey has the support for replication connections and makes them sticky through out the lifetime of logical connection. There are 3 bugs discussed below in ysql connection manager for replication connections which got exposed on running `TestPgReplicationSlot` test. # Once replication connection disconnects, the corresponding walsender process instead of getting shutdown, it goes back to the pool to get attached to next replication connection. This bug was recently fixed as [[ yandex/odyssey@ccd4dbf | commit ]] in upstream odyssey. Doing the same change in ysql connection manager as well. # In ysql connection manager, the session parameters received in the startup packet from the driver are never SET for the replication connections . Therefore it lead to different behaviour for replication connections with and without connection manager for the client. It is fixed by removing the special check for replication connections which doesn't let session variables to SET. # Avoid resetting SESSION variables for replication connections because replication connections are sticky for the life time of the connection in odyssey and the server (Walsender) process gets expired when replication connection disconnects so need to reset the GUC variables. Also as upstream odyssey provides full support for replication connection and resetting of GUC variable at end of transaction is introduced by ysql connection manager therefore matching the same behaviour. Jira: DB-11713 Test Plan: Jenkins: enable connection manager, test regex: .*TestPgReplicationSlot.* Reviewers: skumar, nkumar, asrinivasan Reviewed By: asrinivasan Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D35739
- Loading branch information