For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

1. Back up

  1. Wait until running scans have finished and no scheduled scan is about to start.

  2. Run Backup-All.ps1 from C:\Forestall\FSProtect\setup-files\scripts\utils\ in an elevated PowerShell session. It stops the postgresql-x64-15 and neo4j services, archives the PostgreSQL data directory, the Neo4j data, the reports and the configuration files to C:\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.

Download the zip archive of binaries, not the interactive installer (.exe). Keep the original file name: the script reads the target version from it.

3. Run the update

  1. Open PowerShell as Administrator.

  2. Go to the folder that contains the two files.

  3. 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

If the product is installed on another drive (for example D:\ or E:\), set -InstallRoot to that folder, such as D:\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

  1. Open the Health Check page and confirm the PostgreSQL Database checks for API and Core show Running.

  2. Confirm the new version:

  3. If an AI provider is configured, ask the AI Assistant a documentation question. If it answers, the pgvector extension works.

  4. Once everything works, you can delete the PostgreSQL\15_backup_<timestamp> folder.

Last updated

Was this helpful?