Skip to content
logo
Percona Product Documentation
Migrate from PostgreSQL to Percona Distribution for PostgreSQL
Initializing search
    percona/postgresql-docs
    percona/postgresql-docs
    • Percona Distribution for PostgreSQL 12 Documentation
        • Overview
        • Install on Debian and Ubuntu
        • Install on RHEL and derivatives
        • Enable Percona Distribution for PostgreSQL extensions
        • Repositories overview
      • Migrate from PostgreSQL to Percona Distribution for PostgreSQL
        • Migrate on the same server
        • Migrate on a different server
      • Upgrading Percona Distribution for PostgreSQL from 11 to 12
      • Minor Upgrade of Percona Distribution for PostgreSQL
      • pg_stat_monitor
      • High availability
        • Deploying on Debian or Ubuntu
        • Deploying on RHEL or CentOS
        • Testing the Patroni PostgreSQL Cluster
      • Backup and disaster recovery
        • Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL
      • LDAP authentication
    • Uninstall
      • Release notes index
      • Percona Distribution for PostgreSQL 12.13 (2022-12-01)
      • Percona Distribution for PostgreSQL 12.12 (2022-09-07)
      • Percona Distribution for PostgreSQL 12.11 (2022-06-06)
      • Percona Distribution for PostgreSQL 12.10 Second Update (2022-05-05)
      • Percona Distribution for PostgreSQL 12.10 Update (2022-04-14)
      • Percona Distribution for PostgreSQL 12.10 (2022-03-30)
      • Percona Distribution for PostgreSQL 12.9 (2021-12-13)
      • Percona Distribution for PostgreSQL 12.8 Update (2021-12-07)
      • Percona Distribution for PostgreSQL 12.8 (2021-09-09)
      • Percona Distribution for PostgreSQL 12.7 Third Update (2021-07-15)
      • Percona Distribution for PostgreSQL 12.7 Second Update (2021-07-01)
      • Percona Distribution for PostgreSQL 12.7 Update (2021-06-10)
      • Percona Distribution for PostgreSQL 12.7 (2021-05-24)
      • Percona Distribution for PostgreSQL 12.6 Fourth Update (2021-06-10)
      • Percona Distribution for PostgreSQL 12.6 Third Update (2021-05-10)
      • Percona Distribution for PostgreSQL 12.6 Second Update (2021-04-27)
      • Percona Distribution for PostgreSQL 12.6 Update (2021-04-12)
      • Percona Distribution for PostgreSQL 12.6 (2021-03-09)
      • Percona Distribution for PostgreSQL 12.5 (2020-12-07)
      • Percona Distribution for PostgreSQL 12.4 Update (2020-09-22)
      • Percona Distribution for PostgreSQL 12.4 (2020-09-11)
      • Percona Distribution for PostgreSQL 12.3 (2020-06-11)
      • Percona Distribution for PostgreSQL 12.2 (2020-05-15)
    • Licensing
    • Migrate on the same server
    • Migrate on a different server

    Migrate from PostgreSQL to Percona Distribution for PostgreSQL¶

    Percona Distribution for PostgreSQL includes the PostgreSQL database and additional extensions that have been selected to cover the needs of the enterprise and are guaranteed to work together. Percona Distribution for PostgreSQL is available as a software collection that is easy to deploy.

    We encourage users to migrate from their PostgreSQL deployments based on community binaries to Percona Distribution for PostgreSQL. This document provides the migration instructions.

    Depending on your business requirements, you may migrate to Percona Distribution for PostgreSQL either on the same server or onto a different server.

    Migrate on the same server¶

    To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as pg_hba.conf, postgresql.conf, postgresql.auto.conf) using the tool of your choice. The backup process is out of scope of this document. You can use pg_dumpall or other tools of your choice.

    1. Stop the postgresql server

      $ sudo systemctl stop postgresql.service
      
    2. Remove community packages

      $ sudo apt-get --purge remove postgresql
      
    3. Install percona-release

    4. Enable the repository

      $ sudo percona-release setup ppg12
      
    5. Install Percona Distribution for PostgreSQL packages

    6. (Optional) Restore the data from the backup.
    7. Start the postgresql service. The installation process starts and initializes the default cluster automatically. You can check its status with:

      $ sudo systemctl status postgresql
      

      If postresql service is not started, start it manually:

      $ sudo systemctl start postgresql.service
      

    To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as pg_hba.conf, postgresql.conf, postgresql.auto.conf) using the tool of your choice. The backup process is out of scope of this document. You can use pg_dumpall or other tools of your choice.

    1. Stop the postgresql server

      $ sudo systemctl stop postgresql-12
      
    2. Remove community packages

      $ sudo yum remove postgresql
      
    3. Install percona-release

    4. Enable the repository

      $ sudo percona-release setup ppg12
      
    5. Install Percona Distribution for PostgreSQL packages

    6. (Optional) Restore the data from the backup.
    7. Start the postgresql service

      $ sudo systemctl start postgresql-12
      

    Migrate on a different server¶

    In this scenario, we will refer to the server with PostgreSQL Community as the “source” and to the server with Percona Distribution for PostgreSQL as the “target”.

    To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a different server, do the following:

    On the source server:

    1. Back up your data and all configuration files (such as pg_hba.conf, postgresql.conf, postgresql.auto.conf) using the tool of your choice.
    2. Stop the postgresql service

      $ sudo systemctl stop postgresql.service
      
      $ sudo systemctl stop postgresql-12
      
    3. Optionally, remove PostgreSQL Community packages

    On the target server:

    1. Install percona-release
    2. Enable the repository

      $ sudo percona-release setup ppg12
      
    3. Install Percona Distribution for PostgreSQL packages on the target server.

    4. Restore the data from the backup
    5. Start postgresql service

      $ sudo systemctl start postgresql.service
      
      $ sudo systemctl start postgresql-12
      

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: December 5, 2022
    Created: July 22, 2022
    Back to top
    Percona LLC, © 2022
    Made with Material for MkDocs