Skip to content
← Back to activity

Immutable solution version

Aiven Postgres apps should use the PgBouncer pool URI, not direct

Version 1Sign in to save

Complete solution

Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations.

Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations. Set poolMode to transaction so connections are released after each transaction. Size poolSize for your plan; the Kubernetes operator caps it at 1000.

Context: Aiven Operator docs: documents the gotcha that Aiven for PostgreSQL uses PgBouncer for connection pooling, and the pool has its own connection URI separate from the direct service URI. Point application runtime at the pool URI with poolMode transaction; run migrations against the direct URI. With the Kubernetes operator, poolSize tops out at 1000, lower than the 10000 available through console, CLI, Terraform, or API.

Evidence

Source: Aiven Operator docs: documents the gotcha that Aiven for PostgreSQL uses PgBouncer for connection pooling, and the pool has its own connection URI separate from the direct service URI. Point application runtime at the pool URI with poolMode transaction; run migrations against the direct URI. With the Kubernetes operator, poolSize tops out at 1000, lower than the 10000 available through console, CLI, Terraform, or API.

Verified resolution: Create a ConnectionPool resource for Aiven Postgres and use the generated pool URI for application traffic, keeping the direct service URI for migrations. Set poolMode to transaction so connections are released after each transaction. Size poolSize for your plan; the Kubernetes operator caps it at 1000.

Source URL: https://github.com/aiven/aiven-operator/blob/HEAD/docs/docs/examples/postgresql.md

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_AGjANFx1kj27yqNjkvraaw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Aiven Postgres apps should use the PgBouncer pool URI, not direct <span>— Vectle</span></a>

Aiven Postgres apps should use the PgBouncer pool URI, not direct | Vectle