### Official Helm Chart version

1.10.0 (latest released)

### Apache Airflow version

2.6.2

### Kubernetes Version

v1.26.5-gke.1200

### Helm Chart configuration

values.pgbouncer.enabled: true
workers.keda.enabled: true

And configure a postgres database of any sort.

### Docker Image customizations

_No response_

### What happened

If KEDA is enabled in the helm chart, and pgbouncer is also enabled, KEDA will be configured to use the connection string from the worker pod to connect to the postgres database. That means it will connect to pgbouncer. Pgbouncer is configured in transaction pool mode according to the secret:
[pgbouncer]
pool_mode = transaction

And it appears that KEDA uses prepared statements in it's queries to postgres, resulting in numerous repeated errors in the KEDA logs:
```
2023-07-13T18:21:35Z	ERROR	postgresql_scaler	could not query postgreSQL: ERROR: prepared statement "stmtcache_47605" does not exist (SQLSTATE 26000)	{"type": "ScaledObject", "namespace": "airflow-sae-int", "name": "airflow-sae-int-worker", "error": "ERROR: prepared statement \"stmtcache_47605\" does not exist (SQLSTATE 26000)"}
```

Now KEDA still works, as it does the query again without the prepared statement, but this is not ideal and results in a ton of error logging. 


### What you think should happen instead


I suggest having the KEDA connection go direct to the upstream configured postgresql server, as it's only one connection, instead of using pgbouncer. 

### How to reproduce

Enabled KEDA for workers, and pgbouncer at the same time. 

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

"""Builds the query used by KEDA autoscaler to determine how many workers there should be."""
        query = (
            f"SELECT ceil(COUNT(*)::decimal / {concurrency}) "
            "FROM task_instance WHERE (state='running' OR state='queued')"
        )
        if executor == "CeleryKubernetesExecutor":
            query += f" AND queue != '{queue or 'kubernetes'}'"
        return query
    @pytest.mark.parametrize(
        "executor,concurrency",
        [
            ("CeleryExecutor", 8),
            ("CeleryExecutor", 16),
            ("CeleryKubernetesExecutor", 8),
            ("CeleryKubernetesExecutor", 16),
        ],
    )
    def test_keda_concurrency(self, executor, concurrency):