Upgrading a TDE-enabled database
================================

You can use the `pg_upgrade <https://www.postgresql.org/docs/current/pgupgrade.html>`_  with additional TDE-arguments to perform a
number of upgrading and migrating operations. This table provides an
overview of supported use cases.

.. csv-table::
  :header: Use case,Source unencrypted server,Target encrypted server
  :widths: 12,25,15
  :align: left
  :class: longtable

  Perform a minor upgrade and add encryption,Unencrypted EDB Postgres Extended Server 16.1,Encrypted EDB Postgres Extended Server 16.2
  Change the Postgres distribution and add encryption,Unencrypted PostgreSQL 16,Encrypted EDB Postgres Advanced Server 16
  Maintain the Postgres distribution and add encryption,Unencrypted EDB Postgres Advanced Server 15,Encrypted EDB Postgres Advanced Server 15
  Maintain the Postgres distribution and rotate encryption keys,Encrypted EDB Postgres Advanced Server 15,Encrypted EDB Postgres Advanced Server 15 with new encryption keys

..  Important::
   Both source and target servers must be in the same Postgres major version. `pg_upgrade`  only supports upgrades between minor versions.

Tutorials
---------

See :ref:`Tutorials <Tutorials>`  for a list of step-by-step tutorials that highlight
different migration scenarios.
