# Pgbouncer server DNS lookup failed

**URL:** <https://forums.percona.com/t/pgbouncer-server-dns-lookup-failed/19731>\
**Category:** PostgreSQL\
**Created:** [January 23, 2023, 1:49pm UTC](https://forums.percona.com/t/pgbouncer-server-dns-lookup-failed/19731 "2023-01-23T13:49:31Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![christopher](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/christopher/32/9072_2.png) [@christopher](https://forums.percona.com/u/christopher)\
**Post date:** [September 5, 2023, 9:51am UTC](https://forums.percona.com/t/pgbouncer-server-dns-lookup-failed/19731/11 "2023-09-05T09:51:43Z")

</div>

Good idea!! I’ll try that now.

There may be another way that is baked into pgbouncer. The /docs/content/tutorial/connection-pooling.md file (in the repo) describes a way to change cr.yaml to inject other databases into pgbouncer.ini. It says:

> There are several ways you can customize the configuration:
> 
> - `spec.proxy.pgBouncer.config.global`: Accepts key-value pairs that apply changes globally to PgBouncer.
> - `spec.proxy.pgBouncer.config.databases`: Accepts key-value pairs that represent PgBouncer [database definitions](https://www.pgbouncer.org/config.html#section-databases).

I believe this means that we can add a spec.proxy.pgBouncer.config.databases section to cr.yaml something like this:

```auto
spec:
  proxy:
    pgBouncer:
       config:
         databases:
         - developer: "host=pg-cluster1-ha port=5432"

```

but this did not work. Applying cr.yaml did not generate a cluster so I am sure that I got the syntax wrong.

The online docs do not show this option: [Custom Resource options - Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/1.0/operator.html#operator-custom-resource-options) so perhaps it is something new or perhaps they have not got around to properly implementing it yet. Once configured/working it should allow us to define our own, specific database / host mappings in pgbouncer.ini

I have also posted this question here: [Pgbouncer not finding cluster1-primary - PostgreSQL - Percona Community Forum](https://forums.percona.com/t/pgbouncer-not-finding-cluster1-primary/24940)

Seems strange that I independently ran into the same issue twice when approaching deployment in 2 different ways. I wonder why they have not dealt with it yet. I raised this issue way back in January!

Does anyone here know how to raise this as a bug report on Jira? The existing issue is marked for resolution on version 1.4 so I’m not sure that it will be addressed on version 2. I have tried signing up for an account on Percona Jira but it does not seem to work.

---

_[View the full topic](https://forums.percona.com/t/pgbouncer-server-dns-lookup-failed/19731)._
