Antwort How to upgrade PostgreSQL 12 to 13? Weitere Antworten – How to upgrade PostgreSQL to 13

How to upgrade PostgreSQL 12 to 13?
How to Upgrade Postgresql From 9 to 13

  1. Step 1: Create a backup of the existing Postgresql 9 database.
  2. Step 2: Install PostgreSQL 13.
  3. Step 3: Check consistency between the two versions of Postgres.
  4. Step 3: Upgrade Now.
  5. Step 4: Start the New Postgres Server.
  6. Step 5: Verify the data is correct in Postgresql 13.

Two methods are available for this migration:

  1. • Database dump/restore.
  2. • The pg_upgrade tool.
  3. Dump the PostgreSQL12. x database.
  4. Restore the dump in a PostgreSQL 15. x database.
  5. Run VACUUM ANALYZE command to reorganize PostgreSQL indices.

The general in-place upgrade flow for Percona Distribution for PostgreSQL is the following:

  1. Install Percona Distribution for PostgreSQL 13 packages.
  2. Stop the PostgreSQL service.
  3. Check the upgrade without modifying the data.
  4. Upgrade Percona Distribution for PostgreSQL.
  5. Start PostgreSQL service.

Is Postgres 13 backwards compatible : Minor versions of PostgreSQL (e.g., from PostgreSQL 13 to PostgreSQL 13.2) are always backward compatible with the major version. That means that if you upgrade your production database, it is unlikely that anything is going to break due to the upgrade. However, major versions of PostgreSQL are not backward compatible.

Can I upgrade from Postgres 11 to 13

Fortunately, there is a more efficient method: upgrading with –link and –method=upgrade . Here the old PostgreSQL 11 database is not kept, but converted “in-place” to a PostgreSQL 13 database.

How to upgrade postgres 12 to 14 : Perform the upgrade

  1. Update and install packages sudo apt-get update sudo apt-get install postgresql-14 postgresql-server-dev-14.
  2. Halt the old server sudo systemctl stop postgresql.service.

Perform the upgrade

  1. Update and install packages sudo apt-get update sudo apt-get install postgresql-14 postgresql-server-dev-14.
  2. Halt the old server sudo systemctl stop postgresql.service.


Migrating to a new major version

  1. Create a new database with the desired version.
  2. Disable or suspend any applications that write to your existing database.
  3. Take a backup of your existing database.
  4. Restore the backup to your new database.
  5. Point all of your applications at the new database.

How to upgrade PostgreSQL 12 to 13 windows

Upgrading PostgreSQL in Windows

  1. Install the New Version of PostgreSQL. Before you embark on the upgrade journey, make sure you have the new version installed.
  2. Stop Both PostgreSQL Services.
  3. Configure Authentication.
  4. Create a New Windows User.
  5. Manage File Security.
  6. Open Console with User "postgres"
  7. Execute pg_upgrade.
  8. Clean Up.

Already here we can see that Postgres 14 does much better in the initial data load. As you can see, the throughput of Postgres 14 at 5000 active connections is about 20% higher. At 10,000 active connections the improvement is 50% over Postgres 13, and at lower connection counts you can also see consistent improvements.Perform the upgrade

  1. Update and install packages sudo apt-get update sudo apt-get install postgresql-14 postgresql-server-dev-14.
  2. Halt the old server sudo systemctl stop postgresql.service.


The PostgreSQL 14 version is deprecated, but the PostgreSQL package client or server are still installed. You must install the latest versions of the packages (postgresql-15 and postgresql-client-15) and update your clusters with the command pg_upgradecluster (see the man page).

How to upgrade Postgres 13 to 14 : On Red Hat Enterprise Linux and derivatives using yum

  1. Install Percona Distribution for PostgreSQL 14 packages.
  2. Set up Percona Distribution for PostgreSQL 14 cluster.
  3. Log is as the postgres user.
  4. Set up locale settings.
  5. Initialize cluster with the new data directory.
  6. Stop the postgresql 13 service.
  7. Run the database upgrade.

Should I use Postgres 13 or 14 : Already here we can see that Postgres 14 does much better in the initial data load. As you can see, the throughput of Postgres 14 at 5000 active connections is about 20% higher. At 10,000 active connections the improvement is 50% over Postgres 13, and at lower connection counts you can also see consistent improvements.

Can I upgrade from postgres 11 to 13

Fortunately, there is a more efficient method: upgrading with –link and –method=upgrade . Here the old PostgreSQL 11 database is not kept, but converted “in-place” to a PostgreSQL 13 database.

Perform the upgrade

  1. Update and install packages sudo apt-get update sudo apt-get install postgresql-14 postgresql-server-dev-14.
  2. Halt the old server sudo systemctl stop postgresql.service.