Skip to content

Commit

Permalink
feat: customize max_connections (#276)
Browse files Browse the repository at this point in the history
Close: #275
  • Loading branch information
thebaptiste authored Mar 5, 2024
1 parent 09f5e85 commit 42ec58e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions adm/mfxxx.init.custom
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if test "${MFBASE_POSTGRESQL_FLAG}" = "1"; then
fi
rm -f "/tmp/initdb_pwfile.$$"

sed -i '/^max_connections = 100*/^#max_connections (default 100) is set in included file (see below)/' ${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf
echo "include '${MFMODULE_RUNTIME_HOME}/tmp/config_auto/postgresql.conf'" >>${MFBASE_POSTGRESQL_DATA_DIR}/postgresql.conf
PG_HBA="${MFBASE_POSTGRESQL_DATA_DIR}/pg_hba.conf"
cat >${PG_HBA} <<EOF
Expand Down
1 change: 1 addition & 0 deletions config/config.ini.custom
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# in mfbase (at all)
flag=1
data_dir={{MFMODULE_RUNTIME_HOME}}/var/pgsql
max_connections=100
dbname=metwork
port=7432
locale=C
Expand Down
1 change: 1 addition & 0 deletions config/postgresql.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
port={{MFBASE_POSTGRESQL_PORT}}
max_connections={{MFBASE_POSTGRESQL_MAX_CONNECTIONS}}
log_destination = 'stderr'
logging_collector = off
log_min_messages = warning
Expand Down

0 comments on commit 42ec58e

Please sign in to comment.