Hello aaPanel Support,
I found several issues in PostgreSQL Manager 2.9 on aaPanel 8.0.6 running Ubuntu 24.04.
1. PostgreSQL 18.6 is not detected
My server is running PostgreSQL 18.0. The manager reports that 18.0 is the latest version, although the current PostgreSQL 18 release is 18.6.
The manager downloads this manifest:
https://node.aapanel.com/conf/pgsql_version.json
It currently contains:
{
"major_version": 18,
"minor_version": 0
}
The official PostgreSQL API reports 18.6:
https://www.postgresql.org/versions.json
The aaPanel source archive for PostgreSQL 18.6 is also already available:
https://node.aapanel.com/src/postgresql-18.6.tar.gz
Therefore, check_version_update() compares the installed 18.0 release with the outdated aaPanel manifest and incorrectly returns:
{
"local_version": "18.0",
"cloud_version": "18.0",
"need_update": false
}
Please update the aaPanel version manifest to PostgreSQL 18.6 and consider using the official PostgreSQL API as the primary source or fallback.
2. The update script replaces only bin
The current pgsql_update.sh builds the new release and then copies only:
cp -rf /www/server/new_pgsql/bin/* /www/server/pgsql/bin/
This leaves lib, share, include, extension SQL files and shared libraries on the previous version. The result can be an inconsistent PostgreSQL installation.
A complete minor-version update should replace at least:
bin
lib
share
include
The old program directories should be backed up before replacement so the update can be rolled back if PostgreSQL fails to start.
The data directory must remain unchanged during a minor-version update.
3. pgcrypto is missing from the staged build
The current configure command is:
./configure --prefix=/www/server/new_pgsql --without-readline
Without OpenSSL support, the pgcrypto extension is not built. Several databases on my server use pgcrypto.
The build should include the existing UUID support and OpenSSL:
./configure \
--prefix=/www/server/new_pgsql \
--without-readline \
--with-ssl=openssl \
--with-uuid=ossp
make
make install
make -C contrib
make -C contrib install
I verified that PostgreSQL 18.6 builds successfully on Ubuntu 24.04 with these options and includes both pgcrypto and uuid-ossp.
4. PostgreSQL is restarted twice
The update script already starts PostgreSQL after replacing the files. However, get_update_log() restarts it again when it detects the success file:
if os.path.isfile(update_suscess_file):
public.ExecShell("/etc/init.d/pgsql restart")
This causes an unnecessary second restart and can repeat whenever the update status is requested. The restart should be performed once by the update script after validating the new installation.
Recommended update process
- Validate the requested version.
- Allow only minor updates within the installed major version.
- Download the source from PostgreSQL.org.
- Verify the official SHA-256 checksum.
- Build the complete server and contrib modules in a staging directory.
- Stop PostgreSQL cleanly.
- Back up and replace all program directories.
- Start PostgreSQL and verify
pg_isready.
- Verify
SHOW server_version.
- Restore the previous program files automatically if validation fails.
Please update the PostgreSQL Manager plugin and its version manifest. The current behavior hides available security and bug-fix releases and can create a mixed-version PostgreSQL installation.