Home > OS >  How to upgrade Postgresql 14.1 to 14.2 on Ubuntu 20.04?
How to upgrade Postgresql 14.1 to 14.2 on Ubuntu 20.04?

Time:03-22

Postgresql website says "A dump/restore is not required for those running 14.X." (https://www.postgresql.org/docs/14/release-14-2.html#id-1.11.6.5.4)

Do I still need to use pg_upgrade or there is any other way to upgrade?

CodePudding user response:

As per the docs:

Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number.

You are moving from 14.1 to 14.2 so this applies to your situation. That means you can just upgrade the binaries (so usually apt-get update && apt-get upgrade assuming you are using a repo with the latest release) and restart the service. However, it is worth reviewing the release notes particularly:

some bugs have been found that may have resulted in corrupted indexes, as explained in the first two changelog entries. If any of those cases apply to you, it's recommended to reindex possibly-affected indexes after updating.

CodePudding user response:

You only need to update the binaries using Ubuntu's package manager and restart Postgres (apt update then apt install postgresql-14)

pg_upgrade is only needed to upgrade between major versions (e.g. from 13 to 14 or from 14 to 15). Upgrading 14.1 to 14.2 is a minor version upgrade.

  • Related