Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- [#64] make max_connections to postgresql configurable

## [v14.18-2] - 2025-08-25
### Fixed
Expand Down
6 changes: 6 additions & 0 deletions dogu.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
"Type": "BINARY_MEASUREMENT"
}
},
{
"Name": "database_config/max_connections",
"Description": "Maximum amount of allowed database connections. Allowing to many connections can increase hardware requirements.",
"Optional": true,
"Default": "100"
},
{
"Name": "logging/root",
"Description": "Set the root log level to one of ERROR, WARN, INFO, DEBUG.",
Expand Down
7 changes: 7 additions & 0 deletions resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ function setDoguLogLevel() {
echo "log_min_messages = ${POSTGRESQL_LOGLEVEL}" >>/var/lib/postgresql/postgresql.conf
}

function setMaxConnections() {
# replace default max connection count with configured max connection count
cons=$(doguctl config 'database_config/max_connections')
sed -i "/max_connections/c\max_connections = ${cons}" /var/lib/postgresql/postgresql.conf
}

function runMain() {
# check whether post-upgrade script is still running
while [[ "$(doguctl config "local_state" -d "empty")" == "upgrading" ]]; do
Expand All @@ -147,6 +153,7 @@ function runMain() {

write_pg_hba_conf
setDoguLogLevel
setMaxConnections

# set stage for health check
doguctl state ready
Expand Down