Skip to content

Commit a4cad6f

Browse files
committed
allow setting POSTGRES_MAX_CONNECTIONS
1 parent 253e971 commit a4cad6f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

5.1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The following environment variables are available to tune PostgreSQL:
8282
- `POSTGRES_MAX_WAL_SIZE` (default: `1GB`)
8383
- `POSTGRES_CHECKPOINT_TIMEOUT` (default: `10min`)
8484
- `POSTGRES_CHECKPOINT_COMPLETION_TARGET` (default: `0.9`)
85+
- `POSTGRES_MAX_CONNECTIONS` (default: `100`)
8586

8687
See https://nominatim.org/release-docs/5.1/admin/Installation/#tuning-the-postgresql-database for more details on those settings.
8788

5.1/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [ ! -z "$POSTGRES_SYNCHRONOUS_COMMIT" ]; then sed -i "s/synchronous_commit =
4141
if [ ! -z "$POSTGRES_MAX_WAL_SIZE" ]; then sed -i "s/max_wal_size = 1GB/max_wal_size = $POSTGRES_MAX_WAL_SIZE/g" /etc/postgresql/16/main/conf.d/postgres-tuning.conf; fi
4242
if [ ! -z "$POSTGRES_CHECKPOINT_TIMEOUT" ]; then sed -i "s/checkpoint_timeout = 10min/checkpoint_timeout = $POSTGRES_CHECKPOINT_TIMEOUT/g" /etc/postgresql/16/main/conf.d/postgres-tuning.conf; fi
4343
if [ ! -z "$POSTGRES_CHECKPOINT_COMPLETION_TARGET" ]; then sed -i "s/checkpoint_completion_target = 0.9/checkpoint_completion_target = $POSTGRES_CHECKPOINT_COMPLETION_TARGET/g" /etc/postgresql/16/main/conf.d/postgres-tuning.conf; fi
44-
44+
if [ ! -z "$POSTGRES_MAX_CONNECTIONS" ]; then echo "max_connections = $POSTGRES_MAX_CONNECTIONS" >> /etc/postgresql/16/main/conf.d/postgres-tuning.conf; fi
4545

4646
# import style tuning
4747

0 commit comments

Comments
 (0)