AnalyticDB for PostgreSQL is fully compatible with the open-source Greenplum database and supports smooth migration of applications. This topic describes how to migrate data from a user-created Greenplum database to AnalyticDB for PostgreSQL.

Migration solution

AnalyticDB for PostgreSQL V6.0 is optimized by Alibaba Cloud based on the open source Greenplum 6.0 architecture. AnalyticDB for PostgreSQL V6.0 supports vector computing and transaction processing within a multi-coordinator node architecture and uses the same interfaces as open source Greenplum. A complete migration migrates both applications and data. You can seamlessly migrate your application and select from a variety of data migration solutions to migrate your database.

1
  1. Create an AnalyticDB for PostgreSQL instance. For more information about instance specifications, see Instance specifications.
  2. Migrate Data Definition Language (DDL) statements from user-created Greenplum tables to the AnalyticDB for PostgreSQL instance to create table schemas.
    pg_dumpall --gp-syntax --schema-only > db_dump.sql
  3. Migrate your data by using one of the following solutions:
    • Migrate full data table by table on the cloud by using the data integration feature of DataWorks.
    • Export data from the user-created Greenplum database, upload data to Elastic Compute Service (ECS), and use the COPY statement of AnalyticDB for PostgreSQL to import data to the AnalyticDB for PostgreSQL instance. For more information, see Use the \COPY command.
    • Export data from the user-created Greenplum database, upload data to Object Storage Service (OSS), and use the OSS external table feature to concurrently import data to the AnalyticDB for PostgreSQL instance. For more information, see Import or export OSS data by using OSS external tables.

    You can use DataWorks to easily synchronize data and use the COPY statement or OSS to quickly synchronize data. The OSS external table feature costs less time than the COPY statement.