Skip to content

Commit

Permalink
Generate in cluster version check
Browse files Browse the repository at this point in the history
  • Loading branch information
sebschrader committed Sep 11, 2022
1 parent 814ad02 commit f99a4da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/control-database.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ check_cluster_version() {
local CLUSTER_VERSION PG_VERSION
read -r CLUSTER_VERSION < "$PGDATA/PG_VERSION" || :
local -i PG_VERSION_NUM PG_VERSION_MAJOR PG_VERSION_MINOR
generate_config
PG_VERSION_NUM="$(@POSTGRES@ -C server_version_num --config-file="@pkgrunstatedir@/database/conf/postgresql.conf")"
PG_VERSION_MAJOR=$(( PG_VERSION_NUM / 10000 ))
PG_VERSION_MINOR=$(( PG_VERSION_NUM / 100 % 100 ))
Expand Down Expand Up @@ -102,7 +103,6 @@ do_start() {
error "Error: PostgreSQL cluster already running"
return 3
fi
generate_config
if cluster_exists; then
check_cluster_version
else
Expand Down

0 comments on commit f99a4da

Please sign in to comment.