Skip to main content

Upgrade PostgreSQL version

To enable future improvements and bug fixes, a decision has been made to upgrade the out-of-the-box version of PostgreSQL from 9.6 to 16. To enable this upgrade, flow-scheduler needs to be upgraded to version 2024.3.0 - as the earlier versions are dependent on extensions that are no longer being maintained.

The upgrade also serves a pre-cursor to the upcoming Method Warehouse, future indexing changes using GIN and GIST - as well as just largely keeping the foundations of Flow up to date (as seen with the previous improvements to flow-scheduler, system-wide Java version and ElasticSearch).

Update flow-scheduler​

Updating from 2024.2.0 (or previous versions) to 2024.3.0 removes the dependency on the plpython extension and is therefore in itself vital before taking the leap to PostgreSQL 16.

Update flow-cli​

Once 2024.3.0 has been installed, the flow-cli/flow-installer needs to be updated to enable the PostgreSQL upgrade procedure.

Run the new migrate-command​

  1. cd to the location of the flow-cli contents (from where you normally run the ./flow install, ./... list or ./... update commands)
  2. "sudo ./flow migrate", and provide the version (16) when prompted
  3. Sit back, the following will happen on its own:
    1. The server's postgres directory will be cloned into two new subdirectories, "9.6" (filled with the content from data) and "16" (initially empty)
    2. The running PostgreSQL-service will be stopped
    3. A new container will be prepared, in which the pg_upgrade command will be executed
    4. The pg_upgrade command launches and the logs will be fed to the console 5. If the ./flow install 2024.3.0 has not been run, the pg_ugrade will find old dependencies and fail to conclude the upgrade
    5. The PostgreSQL-image will be updated to the newly installed version, and the service will be scaled back to 1
    6. The "16" (mentioned in step 3.1) directory will now be a clone of the "9.6" directory. If the PostgreSQL-service has been started successfully, the "9.6" directory will be removed.
  4. Done!

Important notes​

The export_method-/export_class-/import_method-functions will no longer be available.