File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ All tests use the default connection string `Data Source=.\SQLEXPRESS;Initial Ca
4242 - ` receiver ` owner ` db_owner `
4343 - ` sender ` owner ` db_owner `
4444 - ` db@ ` owner ` db_owner `
45+
46+ ## Connection pooling for PostgreSQL
47+
48+ Deployments with multiple endpoints running on PostgreSQL require external connection pooling e.g. [ using pgBouncer] ( /docs/postgre-with-pgbouncer.md )
Original file line number Diff line number Diff line change 1+ ## Postgre Sql transport with pgBounder
2+
3+ ## Connection string changes
4+
5+ Running with external connection pool like pgBounder requries changes to the connection string as described in [ NpgSQL compatibility guide] ( https://www.npgsql.org/doc/compatibility.html#pgbouncer ) .
6+
7+ ## Sample deployment
8+
9+ ``` docker-compose
10+ version: '3.8'
11+ services:
12+ db:
13+ image: postgres
14+ container_name: local_pgdb
15+ restart: always
16+ command: -c 'max_connections=100'
17+ environment:
18+ POSTGRES_USER: user
19+ POSTGRES_PASSWORD: admin
20+ volumes:
21+ - local_pgdata:/var/lib/postgresql/data
22+
23+ pgbouncer:
24+ image: edoburu/pgbouncer:latest
25+ environment:
26+ - DB_HOST=local_pgdb
27+ - DB_PORT=5432
28+ - DB_USER=user
29+ - DB_PASSWORD=admin
30+ - ADMIN_USERS=postgres,admin
31+ - AUTH_TYPE=scram-sha-256
32+ - MAX_CLIENT_CONN=70
33+ ports:
34+ - "5432:5432"
35+
36+ pgadmin:
37+ image: dpage/pgadmin4
38+ container_name: pgadmin4_container
39+ restart: always
40+ ports:
41+ - "5050:80"
42+ environment:
43+ PGADMIN_DEFAULT_EMAIL: [email protected] 44+ PGADMIN_DEFAULT_PASSWORD: admin
45+ volumes:
46+ - pgadmin-data:/var/lib/pgadmin
47+
48+ volumes:
49+ local_pgdata:
50+ pgadmin-data:
51+ ```
You can’t perform that action at this time.
0 commit comments