Skip to content

Pgbouncer#18

Closed
pagbrl wants to merge 133 commits intomainfrom
pgbouncer
Closed

Pgbouncer#18
pagbrl wants to merge 133 commits intomainfrom
pgbouncer

Conversation

@pagbrl
Copy link
Copy Markdown
Member

@pagbrl pagbrl commented Jun 23, 2025

No description provided.

pagbrl and others added 30 commits July 30, 2023 14:15
* fix path to roles

* removed recofish task and added remove file task

* add absent state for config files

* delete ngnix conf dir before reinstalling

* add self forwarding config

* feat: Add dummy service and handler

---------

Co-authored-by: Paul Gabriel <pgabriel@37signals.com>
Copy link
Copy Markdown
Contributor

@jean-pasquier jean-pasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super ! L'idée c'est de commencer à utiliser pgbouncer sur n8n avant d'étendre aux autres services ? Sinon j'ai mis quelques commentaires notamment sur l'image docker qui est sans doute plus valable depuis la migration bitnami cf bitnami/containers#83267

DB_POSTGRESDB_PORT=6432
DB_POSTGRESDB_USER=n8n
DB_POSTGRESDB_PASSWORD={{ lookup('env', 'N8N_DB_PASSWORD') }}
DB_POSTGRESDB_PASSWORD=
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le mdp doit être le même que si on se connectait à pg directement non ? Et donc pas besoin de modifier cette variable ?

@@ -0,0 +1,20 @@
services:
app:
image: bitnami/pgbouncer:latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cet été Bitnami a migré ses images docker vers bitnamilegacy donc faut pull depuis bitnamilegacy/pgbouncer le tag le plus récent visiblement c'est bitnamilegacy/pgbouncer:1.24.1-debian-12-r10

[databases]

{% for db in databases %}
{{ db.username }} = host={{ lookup('env', 'POLETECH_DB_HOST') }} port={{ lookup('env', 'POLETECH_DB_PORT') }} dbname={{ db.dbname }} user={{ db.username }} pool_size={{ db.pool_size if db.pool_size is defined else 10 }} reserve_pool={{ db.reserve_pool if db.reserve_pool is defined else 2 }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je comprends pas bien les implications de spécifier le user= pour chaque db. La doc dit

If user= is set, all connections to the destination database will be done with the specified user, meaning that there will be only one pool for this database.
Otherwise, PgBouncer logs into the destination database with the client user name, meaning that there will be one pool per user.

En général plusieurs users sont créés par db dans tf (eg reader et readwrite) j'ai l'impression non ?

Sinon c'est mieux de mettre {{ db.dbname }} en clé non (justement si le user n'a pas le nom exact de la db) ? {{ db.dbname }} = host={{ lookup(....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants