Newired 26.2 Upgrade: PostgreSQL Database Migration (Docker)

Modified on Thu, 2 Jul at 4:08 PM


Upgrading to Newired 26.2 or Later — Database Migration Required

Applies to: Customers upgrading from Newired 26.1 or earlier to 26.2 or later


What changed

Starting with Newired 26.2, the database engine has been upgraded from PostgreSQL 14 to PostgreSQL 18. The two versions use incompatible binary data formats, so the existing database must be migrated before the new version of Newired can start.

If you skip this step, Newired will fail to start with the following error:

FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 14,        which is not compatible with this version 18.

Scope — Docker vs. external database


This article applies only to the database bundled with Newired's official Docker deployment (the nw-db container).

If you are running PostgreSQL on a dedicated server or managed cloud service (outside Docker), no database engine upgrade is  required when upgrading Newired to 26.2 or later. The Newired application connects to your existing PostgreSQL instance via standard JDBC and Flyway migrations — it does not depend on a specific PostgreSQL major version. Simply upgrade the Newired application as usual. For general PostgreSQL administration and upgrades, refer to the official documentation at https://www.postgresql.org/docs/current/upgrading.html.


Who needs to do this

SituationAction required
Fresh installation (no existing data)None — skip entirely
Upgrading from Newired ≤ 26.1 to ≥ 26.2Run the upgrade script
Already running Newired ≥ 26.2None — already on PG 18

How to upgrade

A step-by-step upgrade guide and an automated upgrade script are included in every Newired 26.2+ deployment package, inside the upgrade-postgres/ folder:

upgrade-postgres/
  README.md              ← Start here
  upgrade-postgres.sh    ← Automated upgrade script
 


Open upgrade-postgres/README.md and follow Part 1 — How to upgrade.


The script handles the full migration automatically, including a safety backup of your PostgreSQL 14 data that you can use to roll back if anything goes wrong.


Before you start

  • Stop all Newired services before running the upgrade (docker compose down).
  • Make sure the database data directory is mapped to a local path on disk (see the README for the exact requirement).
  • The upgrade takes a few minutes depending on database size.
  • After the upgrade, a one-line change to docker-compose.yml is required (documented in the README).

Need help?

If you run into any issues, the upgrade-postgres/README.md also contains a Troubleshooting section covering the most common problems and their fixes. If the issue is not covered there, please contact Newired support and include the output of the upgrade script.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article