While starting mfbase after upgrade from v2.1 to 2.3, the mfbase status returns errors, the postgresql engine does not start:
- Waiting PostgreSQL... [ ERROR ] (timeout)
- Testing postgresql access... [ ERROR ]
The log/postgresql.log shows:
2026-04-15 14:22:19.328 UTC [3803] FATAL: database files are incompatible with server
2026-04-15 14:22:19.328 UTC [3803] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 17.5.
How to reproduce:
# start mfbase 2.1 container
docker run -it --rm --name mfbase metwork/mfbase-rocky9:2.1.7 bash
# start mfbase
su - mfbase
mfbase.start
# postgresql "data dir" v14 is initialized automatically (~/var/pgsql/)
# check status, everything is OK
mfbase.status
# uninstall mfbase 2.1
mfbase.stop
exit
yum remove -y metwork-mfbase
# edit metwork.repo - replace 2.1 by 2.3
sed -i 's/2.1/2.3/g' /etc/yum.repos.d/metwork.repo
# install mfbase 2.3
yum install -y metwork-mfbase
# start mfbase 2.3
su - mfbase
mfbase.start
# ERRORS are shown
# - Waiting PostgreSQL... [ ERROR ] (timeout)
# - Testing postgresql access... [ ERROR ]
# check log ~/log/postgresql.log
# 2026-04-15 14:22:19.328 UTC [3803] FATAL: database files are incompatible with server
# 2026-04-15 14:22:19.328 UTC [3803] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 17.5.
# we cannot use mfbase 2.3 :-(
How it was working before, example upgrading from v1.0 to v2.3:
# start mfbase 1.0 container (based on rockylinux 8.10)
docker run -it --rm --name mfbase rockylinux/rockylinux:8.10
# install mfbase 1.0
printf "[metwork_release_1.0]\nname=Metwork Release Branch release_1.0\nbaseurl=http://metwork-framework.org/pub/metwork/releases/rpms/release_1.0/portable/\ngpgcheck=0\nenabled=1\nmetadata_expire=0\n" > /etc/yum.repos.d/metwork.repo
yum install -y metwork-mfbase
# start mfbase
su - mfbase
mfbase.start
# postgresql "data dir" v12 is initialized automatically (~/var/pgsql/)
# check status, everything is OK
mfbase.status
# uninstall mfbase 1.0
mfbase.stop
exit
yum remove -y metwork-mfbase
# edit metwork.repo - replace 1.0 by 2.3
sed -i 's/1.0/2.3/g' /etc/yum.repos.d/metwork.repo
# install mfbase 2.3
yum install -y metwork-mfbase
# start mfbase 2.3
su - mfbase
mfbase.start
# postgresql "data dir" v17.5 is initialized automatically (~/var/pgsql/)
mfbase.status
# everything is OK
# we can use mfbase 2.3 ! :-D
Analysis:
While uninstalling version 1.0, the postgresql data dir (v12) is moved to /home/mfbase.rpmsave.../var/pgsql with the saved HOME DIR, so when installing v2.3, the postgresql data dir (/home/mfbase/var/pgsql/) does not exist and is initiliaized automatically in version v17.5. Everything is OK ! mfbase upgraded to v2.3 with postgreSQL v17.5 working fine. The data dir v14 from v1.0 has been saved.
While uninstalling version 2.1, the HOME DIR is kept, so the postgresql data dir (v14) remains on /home/mfbase/var/pgsql so when installing v2.3, as a postgresql data dir already exists on /home/mfbase/var/pgsql/ a new data dir is not initialized in version v17.5.... postgreSQL v17.5 try to starts with a data dir v14, which is not possible ! mfbase is not working !
This appears to be a regression.
Workaround:
Execute a manual mfbase.init after upgrade to 2.3, before starting mfbase.
Proposed solution:
Remove the postgresql data dir /home/mfbase/var/pgsql/ while uninstalling mfbase, it is already saved on /home/mfbase.rpmsave.../var/pgsql.
While starting mfbase after upgrade from v2.1 to 2.3, the mfbase status returns errors, the postgresql engine does not start:
The log/postgresql.log shows:
How to reproduce:
How it was working before, example upgrading from v1.0 to v2.3:
Analysis:
While uninstalling version 1.0, the postgresql data dir (v12) is moved to
/home/mfbase.rpmsave.../var/pgsqlwith the saved HOME DIR, so when installing v2.3, the postgresql data dir (/home/mfbase/var/pgsql/) does not exist and is initiliaized automatically in version v17.5. Everything is OK ! mfbase upgraded to v2.3 with postgreSQL v17.5 working fine. The data dir v14 from v1.0 has been saved.While uninstalling version 2.1, the HOME DIR is kept, so the postgresql data dir (v14) remains on
/home/mfbase/var/pgsqlso when installing v2.3, as a postgresql data dir already exists on/home/mfbase/var/pgsql/a new data dir is not initialized in version v17.5.... postgreSQL v17.5 try to starts with a data dir v14, which is not possible ! mfbase is not working !This appears to be a regression.
Workaround:
Execute a manual mfbase.init after upgrade to 2.3, before starting mfbase.
Proposed solution:
Remove the postgresql data dir
/home/mfbase/var/pgsql/while uninstalling mfbase, it is already saved on/home/mfbase.rpmsave.../var/pgsql.