Possible to have two versions of postgresql installed?

Needing to migrate from a postgresql v9.6 installation to postgresql v12.x on a CL server. (Version 31700)

Since Postgresql mainline is three major versions ahead, it’s unlikely that data files from v9.6 will be binary compatible with v12.x. Hence nervous to try upgrade in place, as have little confidence it will work.

Current plan is hoping to do a dump and restore on the same server between versions. i.e.

pg_dump postgres > postgres_db.bak

then psql empty_database < backup_file on pgsql v12

Open to other ideas too :slight_smile:

The dump and restore is how I usually do migrations to major versions of SQL databases too. Keep an eye on the log/journal output too, sometimes it asks to run a script to fix table/schema compatibility.

Backup, backup, backup :slight_smile:

Thanks puneetse. Good advice.

So its fine to install two diff pgsql versions on same installation? swupd not gonna complain?

They don’t have any files in common so there is no conflict.

1 Like