Updating PostgreSQL
PostgreSQL 15 is bundled in the installation folder (PostgreSQL\15). PostgreSQL publishes security updates within version 15 regularly. Use this page to move the bundled database to the latest PostgreSQL 15 release.
This page covers updates within PostgreSQL 15 only. Upgrading to version 16 or later changes the on-disk data format. Contact Forestall support before attempting it.
1. Back up
Wait until running scans have finished and no scheduled scan is about to start.
Run
Backup-All.ps1fromC:\Forestall\FSProtect\setup-files\scripts\utils\in an elevated PowerShell session. It stops thepostgresql-x64-15andneo4jservices, archives the PostgreSQL data directory, the Neo4j data, the reports and the configuration files toC:\backups, then restarts both services.
2. Download the files
Download these two files into the same folder on the Forestall server:
Update script: Upgrade-PostgreSQL.ps1
PostgreSQL 15 binaries: open EDB PostgreSQL binaries and download the latest PostgreSQL 15.x release for Windows x86-64. The file is named like
postgresql-15.<minor>-<build>-windows-x64-binaries.zip.
3. Run the update
Open PowerShell as Administrator.
Go to the folder that contains the two files.
Run the script and wait for it to finish:
.\Upgrade-PostgreSQL.ps1 -ZipPath .\postgresql-15.<minor>-<build>-windows-x64-binaries.zip -InstallRoot C:\Forestall\FSProtect
The script stops the postgresql-x64-15 service and renames the current PostgreSQL\15 folder to a timestamped backup (PostgreSQL\15_backup_<timestamp>). It then extracts the new binaries and copies the data folder and its permissions back. The PostgreSQL binaries don't include the pgvector extension. If the previous installation had it, the script copies it over. Older installations without pgvector are updated the same way. Finally, the script starts the service, updates the PostgreSQL version entries in the registry, and resets IIS.
If extracting or moving the files fails, the script restores the previous installation automatically. If it fails after that point, the backup folder stays in place for manual recovery. Don't delete it until you have verified the update.
4. Verify
Open the Health Check page and confirm the PostgreSQL Database checks for API and Core show Running.
Confirm the new version:
If an AI provider is configured, ask the AI Assistant a documentation question. If it answers, the
pgvectorextension works.Once everything works, you can delete the
PostgreSQL\15_backup_<timestamp>folder.
Last updated
Was this helpful?