# Pgbouncer configuration

**URL:** <https://forums.percona.com/t/pgbouncer-configuration/18904>\
**Category:** PostgreSQL General Discussion\
**Created:** [December 3, 2022, 7:23am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904 "2022-12-03T07:23:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viktor\_Kucher](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/viktor_kucher/32/8540_2.png) [@Viktor\_Kucher](https://forums.percona.com/u/Viktor_Kucher)\
**Post date:** [December 3, 2022, 7:23am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904/1 "2022-12-03T07:23:49Z")

</div>

Hi,

I would like to set custom parameters for pgbouncer like for postgres

> **[Changing PostgreSQL Options - Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/options.html#creating-a-cluster-with-custom-options)**
>
> Documentation

Is it possible do it in code instead of modify specific config map and restart pgbouncer pods?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ege\_Gunes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ege_gunes/32/4595_2.png) [@Ege\_Gunes](https://forums.percona.com/u/Ege_Gunes)\
**Post date:** [December 3, 2022, 10:10am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904/2 "2022-12-03T10:10:43Z")

</div>

Hi @Viktor_Kucher,

Why do you want to change operator code for customizing pgbouncer?

---

<div class="post-metadata">

**Author:** ![Viktor\_Kucher](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/viktor_kucher/32/8540_2.png) [@Viktor\_Kucher](https://forums.percona.com/u/Viktor_Kucher)\
**Post date:** [December 3, 2022, 11:09am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904/3 "2022-12-03T11:09:16Z")

</div>

for example max\_client\_conn because default value is 100 and I would like to increase it.

---

<div class="post-metadata">

**Author:** ![Ege\_Gunes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ege_gunes/32/4595_2.png) [@Ege\_Gunes](https://forums.percona.com/u/Ege_Gunes)\
**Post date:** [December 5, 2022, 7:07am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904/4 "2022-12-05T07:07:47Z")

</div>

I understand why you want to customize pgbouncer configuration. But doing it in the code means you’ll maintain your own fork for this customization. Are there anything that blocks you from creating a config map?

---

<div class="post-metadata">

**Author:** ![Viktor\_Kucher](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/viktor_kucher/32/8540_2.png) [@Viktor\_Kucher](https://forums.percona.com/u/Viktor_Kucher)\
**Post date:** [December 6, 2022, 9:53am UTC](https://forums.percona.com/t/pgbouncer-configuration/18904/5 "2022-12-06T09:53:49Z")

</div>

Of course I can update config map for pgbouncer and restart pgbouncer. Percona operator supports custom config map for pgCluster, like

spec:  
…  
pgPrimary:  
…  
customconfig: “cluster1-custom-config”  
.  
is it possible to use custom configuration for pgbouncer ?
