Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

PostgreSQL details

Unimus 2.5 and older support only PostgreSQL 11 and below. From Unimus 2.6 onward, all newer PostgreSQL versions are supported. If you're on PostgreSQL 11 and want to move to a newer version, follow the steps below.

For background on upgrading PostgreSQL in general, see the official documentation: https://www.postgresql.org/docs/current/pgupgrade.html

Migrating from PostgreSQL 11 to 12+

There are two ways to do this:

...

The examples below use PostgreSQL 18 on port 5433 as the target. Change the version and port to match your setup.

Same host (pg_upgrade)

1. Install the new PostgreSQL version alongside the old one.

...

Until you do this, you can roll back by starting the old cluster again and pointing Unimus back at it. This works only if pg_upgrade ran in the default copy mode.

Different host or managed instance (dump and restore)

1. Stop Unimus.

sudo systemctl stop unimus

...

You don't need to handle OIDs here. pg_dump from version 12 onward drops them automatically.

Common errors

ErrorFix
You must have read and write access in the current directorycd /tmp before running pg_upgrade.
could not connect to source postmasterAdd -o and -O with config_file= (step 7).
old cluster does not use data checksums but the new one doesRecreate the 18 cluster with --no-data-checksums.
Checking for tables WITH OIDS – fatalSee step 6. The file pg_upgrade lists tells you which tables.
password authentication failed for user "unimus"md5 password on a 14+ target. Run ALTER USER ... WITH PASSWORD (step 3).
unsupported version (1.16) in file headerThe dump was made by a newer pg_dump than the target server. Use the target version's pg_dump.
analyze_new_cluster.sh prints Done but statistics stay emptyThe script runs vacuumdb without a port, so it uses 5432. Run vacuumdb -p <new port> --all --analyze-in-stages yourself.

...