Deployments::UpdateEnvironmentWorker issues long database transactions
On GitLab.com, Deployments::UpdateEnvironmentWorker
has been identified to issue long database transactions. Based on the sampling of pg_stat_activity, we have seen transaction timings go up to about 1 minute.
This is issue is to track investigation and proposed steps to change the design, so that we reduce the length of individual database transactions related to this worker.
See https://gitlab.com/gitlab-org/gitlab/-/issues/342843 for more statistics.