Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

PostgreSQL->PostgreSQL

Updated on 2022-08-16 GMT+08:00

Operation Constraints

DRS has the following constraints on common operations in the case of migration failures caused by unpredictable errors or sudden environment changes.
Table 1 Operation constraints

Type

Constraint

Notes

  • Environment constraints in Table 2 must be complied with during the entire migration process.
  • A migration task can migrate data of only one database. If multiple databases in a PostgreSQL instance need to be migrated, create a real-time migration task for each database.
  • Table-level migration refers to the migration of tables, views, materialized views, and sequences. The constraints, indexes, and rules created for tables are migrated together with the tables. Triggers are not migrated. Objects that have dependencies must be migrated at the same time or created in the destination in advance to avoid migration failure. Common dependencies: tables referenced by views, views referenced by views, tables referenced by primary and foreign keys, parent tables referenced by child tables, partitioned tables referenced by sub-partitioned tables, and sequences referenced by auto-increment columns.

Precautions

  • During the migration, do not modify or delete the usernames, passwords, permissions, or ports of the source and destination databases.
  • During the migration, do not write data to the destination database. Otherwise, data will be inconsistent.
  • During a full migration, ongoing changes made to the source database cannot be fully synchronized to the destination database. Ensure that no change is made to the source database during the full migration. Otherwise, data inconsistency may occur.
  • During task startup or full migration, do not perform DDL operations on the source database, such as deleting or adding tables. Otherwise, the migration fails.
  • After the full migration of materialized views, if the destination database needs to use the materialized views, run the following statement to update the views:
    refresh materialized view matviewname;
  • During a database-level migration, if the destination database user is not a superuser, the following objects created in the source database cannot be migrated due to insufficient permissions: EVENT TRIGGER, CAST with the WITHOUT FUNCTION parameter specified, and FUNCTION with the LEAKROOF or SUPPORT parameter specified.

Environment Constraints

  • Ensure that the environment configuration meets the following constraints. DRS automatically checks the following items and provides handling suggestions.
    Table 2 Environment constraints

    Type

    Constraint

    Database permissions

    • Full migration (minimum permissions):
      • The source database user must have the CONNECT permission for databases, the USAGE permission for schemas, the SELECT permission for tables, the SELECT and USAGE permissions for sequences, and the UPDATE, DELETE, and TRUNCATE permissions for tables without primary keys (only for locking tables without primary keys for a short period of time).
      • During a database-level migration, the destination database account must have the CREATEDB permission.
      • During table-level migration, if the database does not exist, the destination database account must have the CREATEDB permission. If the database exists, the destination database account must have the CREATE and CONNECT permissions. If a schema exists, the CREATE and USAGE permissions are required.

    Migration objects

    • Supported objects: tables, indexes, foreign keys, stored procedures, functions, views, constraints, triggers, modes, sorting rules, code conversion information, data types, aggregate functions, operators, sequences, materialized views, statistical extensions, rules, event triggers, type conversion, conversion information, text search parsers, text search dictionaries, text search template, and text search configurations.
    • Supports the following field types: digit, currency, character, binary, date/time, Boolean, enumeration, geometry, network address, bit, text search, UUID, XML, JSON, array, compound, and range.
    • Plugins cannot be migrated. If the source contains plugins other than plpgsql, install the plugins in the destination in advance. The version of the plugins in the destination must be the same or newer than those in the source. If you can relocate the plugin to a schema in the destination database, specify the schema the same as that in the source database.
    • Temporary tables in the source database cannot be migrated.
    • Data cannot be migrated from the database of a later major version to the database of an earlier major version.
    • System schemas that are not migrated include: schemas starting with pg_ and information_schema. For RDS PostgreSQL Enhanced Edition, the following schemas are not migrated: sys, utl_raw, dbms_lob, dbms_output, and dbms_random.

    Source database

    • The source database name cannot contain the following characters: + % "\ '>< . The schema name and table name cannot contain double quotation marks (") and periods (.).
    • The trigger name in the source database must be unique.
    • The block_size value of the source database cannot be greater than that of the destination database.
    • The source database version cannot be earlier than PostgreSQL 9.4.
    • If the source database type is RDS PostgreSQL Enhanced Edition, the destination database type must be the same.
    • To ensure the security of the source database connection, set the ssl parameter of the source database to on and ensure that the source database uses the password authentication mode. To change the authentication mode, add host all <src_user_name> <drs_instance_ip>/32 md5 to the first line of all configurations in the pg_hba.conf file of the source database, and then run the select pg_reload_conf(); statement as the superuser in the source database or restart the DB instance for the change to take effect.

    Destination database

    • The destination database version cannot be older than the source database version.
    • The destination DB instance is running properly.
    • During a database-level migration, if the source does not contain plugins other than plpgsql, the destination cannot contain databases with the same name as the source databases to be migrated. If a plugin other than plpgsql is installed in the source database, ensure that only the plugin is installed in the destination database and no other self-built objects are created.
    • During a table-level migration, the destination database cannot contain objects with the same names as the objects to be migrated in the source database.
    • The destination DB instance must have sufficient storage space.
    • The lc_monetary values of the source and destination databases must be the same.
    • The block_size value of the destination database must be greater than that of the source database.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback