When a cloud migration assessment report shows a failure status, click View report in the operation column to see which checks failed. Each check covers a specific compatibility or configuration requirement.
Report severity levels:
| Level | Meaning | Action required |
|---|---|---|
| Error | A blocking issue that will cause the migration to fail | Fix all errors before retrying the migration |
| Warning | A potential risk that may cause unexpected behavior after migration | Review and address before migrating |
The assessment runs the following checks:
For instructions on running a cloud migration, see Use the cloud migration feature for an ApsaraDB RDS for PostgreSQL instance.
Check rds empty
Check item: Check rds databases
Error message:
error:postgres not empty, check if any table existsImpact: The migration writes data into the destination RDS instance from scratch. If the destination already contains databases or tables, the migration will fail or produce duplicate data.
Solution:
Delete all databases except template0, template1, and postgres from the ApsaraDB RDS for PostgreSQL instance. Then, in the postgres database, delete all tables except ha_health_check.
Check source connectivity
This check validates network and authentication access between the source self-managed PostgreSQL instance and the destination ApsaraDB RDS for PostgreSQL instance. It runs six sub-checks.
Check ip connectable
Error message:
error:XX.XX.XX.XX is unapproachableImpact: The migration service cannot reach the source host. Full backup and replication will fail immediately.
Solution:
If the self-managed PostgreSQL instance runs on an Elastic Compute Service (ECS) instance, enter the private IP address of the ECS instance as the source host. To find the private IP address, see View IP addresses.
If the self-managed PostgreSQL instance runs in a data center, enter the IP addresses of the DNS servers on the source host.
Check port connectable
Error message:
error:5432 is unapproachableImpact: The migration service cannot establish a TCP connection to PostgreSQL. The migration cannot start.
Solution:
Address one or both of the following causes:
Remote connections are not enabled: Add
listen_addresses = '*'to thepostgresql.conffile on the source instance. For details, see Configure the postgresql.conf file of a self-managed PostgreSQL instance.Firewall is blocking port 5432: Configure the firewall to allow inbound traffic on port 5432, or disable the firewall before starting the migration. For details, see Configure the firewall of a server.
Check database connectable
Error message:
error:cannot connect to source database by migratetest:123456Impact: The migration service cannot authenticate against the source database. The migration cannot start.
Solution:
Address one or both of the following causes:
Incorrect password: Verify that the credentials work by connecting manually. To reset the password, run:
ALTER USER migratetest WITH PASSWORD '123456';pg_hba.conf is not configured to allow connections from the RDS VPC: Add the following line to
pg_hba.conf:host all migratetest <CIDR block of the VPC to which the ApsaraDB RDS for PostgreSQL instance belongs> md5For details on updating
pg_hba.conf, see Update the pg_hba.conf file.
Check account replication privilege
Error message:
error:migratetest has no replication privilegeImpact: The migration service uses streaming replication to sync ongoing changes. Without the REPLICATION privilege, incremental replication will fail after the full backup completes.
Solution:
Address one or both of the following causes:
Account lacks REPLICATION privilege: Grant the privilege:
ALTER ROLE migratetest REPLICATION;pg_hba.conf does not allow replication connections from the RDS VPC: Add the following line to
pg_hba.conf:host replication migratetest <CIDR block of the VPC to which the ApsaraDB RDS for PostgreSQL instance belongs> md5For details on updating
pg_hba.conf, see Update the pg_hba.conf file.
Check account createrole privilege
Error message:
error:migratetest has no createrole privilegeImpact: The migration service needs to recreate roles on the destination instance. Without CREATEROLE, role migration will fail.
Solution:
Grant the CREATEROLE privilege:
ALTER ROLE migratetest CREATEROLE;Check account monitor privilege
Error message:
error:migratetest should be a member of pg_monitor to monitor replication statusImpact: The migration service queries pg_stat_replication and pg_stat_wal_receiver to track replication progress. Without the pg_monitor role, the service cannot confirm that replication is keeping up, which may cause the migration to stall or fail silently.
Solution:
Grant the pg_monitor role:
GRANT pg_monitor TO migratetest;Check source version
Check item: Check major version consistent
Error message:
error:version mismatch, source version:10, current version:13.0Impact: Cross-major-version migration is not supported. The migration will fail if the source and destination run different major engine versions.
Solution:
Purchase an ApsaraDB RDS for PostgreSQL instance that runs the same major engine version as the self-managed PostgreSQL instance.
Check source glibc version
Check item: Check source glibc version compatible
Warning message:
warning:source glibc version is not compatible with rds pgImpact: The GNU C Library (glibc) version affects how PostgreSQL sorts characters in UTF-8 encoding. Version 2.28 introduced different collation orders. If the source and destination use different glibc versions, text indexes with non-C collations may return results in an unexpected order after migration, causing query correctness issues.
Solution:
Run the following diagnostic queries in order to assess the actual risk to your data.
Check whether the current collation order affects your data:
If the result is
true, the collation order is not affected. No further action is needed.If the result is
false, continue to step 2.
BEGIN; CREATE TEMP TABLE testcollation(id varchar(20) COLLATE "en_US.utf8") ON COMMIT DROP; INSERT INTO testcollation VALUES('-1'),('1'); SELECT id='1' FROM testcollation ORDER BY id LIMIT 1; ROLLBACK;Check whether any databases use non-C collations:
If no rows are returned, the migration does not have collation risks. No further action is needed.
If rows are returned, continue to step 3.
SELECT datname, datcollate FROM pg_database WHERE datcollate NOT IN ('C', 'POSIX');Identify all indexes with non-C collations across all databases:
If no rows are returned, the migration does not have collation risks.
If rows are returned, the affected indexes may produce incorrect sort results after migration. Evaluate whether these indexes affect application queries before proceeding.
WITH result AS ( WITH defcoll AS ( SELECT datcollate AS coll FROM pg_database WHERE datname = current_database() ) SELECT indrelid::regclass::text relname, indexrelid::regclass::text indexname, CASE WHEN c.collname = 'default' THEN defcoll.coll ELSE c.collname END AS collation FROM (SELECT indexrelid, indrelid, indcollation[i] coll FROM pg_index, generate_subscripts(indcollation, 1) g(i)) s JOIN pg_collation c ON coll=c.oid CROSS JOIN defcoll WHERE collprovider IN ('d', 'c') AND collname NOT IN ('C', 'POSIX') ) SELECT result.relname, result.indexname, result.collation FROM result WHERE result.collation NOT IN ('C', 'POSIX');
Check disk size
Check item: Check disk size enough
Error message:
error:source_db_size > disk_size * 0.95Impact: The source data must fit within 95% of the destination's available storage. If the destination storage is too small, the full backup transfer will fail partway through, leaving the destination in an incomplete state.
Solution:
Check the total data size on the source instance (result is in MB):
SELECT SUM(pg_database_size(pg_database.datname))/1024/1024 AS size FROM pg_database;Calculate the required storage. The destination storage must be at least 110% of the source data size. For example, if the source uses 100 GB, the destination must have at least 110 GB of available storage.
Expand the storage of the ApsaraDB RDS for PostgreSQL instance. For instructions, see Change instance specifications.
Check wal keep size
Check item: Check wal keep size large enough
Warning message:
warning:wal_keep_size X MB is too small. Try to set wal_keep_segments or wal_keep_size large enough ensure pg_basebackup successImpact: During migration, pg_basebackup transfers a full snapshot of the source database. If the source generates WAL faster than pg_basebackup can copy data, and the source does not retain enough WAL segments, pg_basebackup will fail with a "WAL segment has been removed" error.
Solution:
Increase the WAL retention setting on the ApsaraDB RDS for PostgreSQL instance to reduce the risk of pg_basebackup failure:
PostgreSQL 13 and later: Increase the value of
wal_keep_size.Earlier than PostgreSQL 13: Increase the value of
wal_keep_segments.
For PostgreSQL versions earlier than 13, the relationship between the two parameters is: wal_keep_size = wal_keep_segments × wal_segment_size.Check spec params
Check item: Check if spec params too large
Error messages:
error:max_connections too large, value=XXX
error:max_prepared_transactions too large, value=XXXImpact: If max_connections or max_prepared_transactions on the source instance is more than 100 times the corresponding values on the destination RDS instance, the destination instance may fail to start when the migration service establishes the replication link.
Solution:
Decrease max_connections and max_prepared_transactions on the source instance to bring them within 100 times the destination values.
Changes tomax_connectionsandmax_prepared_transactionsrequire a restart of the source PostgreSQL instance to take effect.
Check rds user
Check item: Check if rds system user is occupied
Warning message:
warning:Check if rds system user is occupied ...XXX will be reused in rdsImpact: ApsaraDB RDS for PostgreSQL reserves the accounts aurora, replicator, and pgxxx for internal system use. If these accounts exist in the source instance, the migration may overwrite their configurations on the destination, causing management functions to break.
Solution:
Make sure that you do not use the accounts aurora, replicator, and pgxxx in the self-managed PostgreSQL instance.
Check extensions
This check validates extension compatibility between the source self-managed PostgreSQL instance and the destination ApsaraDB RDS for PostgreSQL instance. It runs three sub-checks.
Check source supported extensions
Error message:
error:Check source supported extensions XXX not supportedImpact: Extensions that exist in the source but are not supported by ApsaraDB RDS for PostgreSQL cannot be created on the destination. If the migration proceeds, objects that depend on these extensions will fail to function.
Solution:
Drop the unsupported extensions from the source instance:
DROP EXTENSION <extension_name>;Check source extensions with higher version
Error message:
error:Check source extensions with higher version XXXImpact: ApsaraDB RDS for PostgreSQL cannot load extensions whose version is higher than the version it ships. The extension will fail to initialize on the destination, causing any dependent objects to break.
Solution:
Reinstall the affected extensions on the source instance at the same version as the destination:
DROP EXTENSION <extension_name>;
CREATE EXTENSION <extension_name> VERSION '<destination_version>';Check source extensions with lower version
Warning message:
warning:Check source extensions with lower version XXXImpact: Extensions on the source instance are at an older version than those on the destination. This is expected and safe — extensions are automatically upgraded to the destination version after migration.
Solution:
No action is required.
Check Postgres system catalogs
This check inspects the source instance's system catalogs for configurations that are incompatible with ApsaraDB RDS for PostgreSQL. It runs four sub-checks.
Unsupported procedural languages
Error message:
error: disallowed language exist in databases [xxx, xxx], the languages allowed are [c, internal, sql, plpgsql, pltcl, plperl].Impact: ApsaraDB RDS for PostgreSQL supports only C, internal, SQL, PL/pgSQL, PL/Tcl, and PL/Perl. Functions written in other languages cannot be migrated and will fail on the destination.
Solution:
Drop the unsupported languages from the affected databases on the source instance:
DROP LANGUAGE <language_name>;Large objects
Error message:
error: large object exist in databases [xxx, xxx].Impact: ApsaraDB RDS for PostgreSQL does not support PostgreSQL large objects. Large objects in the source instance cannot be migrated and will be absent from the destination.
Solution:
Delete all large objects from the affected databases on the source instance before migrating.
Default ACL settings
Error message:
error: default acl settings exist in databases [xxx, xxx].Impact: The ALTER DEFAULT PRIVILEGES statement populates pg_catalog.pg_default_acl, which stores default permission grants for future objects. These settings cannot be migrated directly and will cause the migration check to fail.
Solution:
On the source instance, revoke all default privileges to clear
pg_default_acl:ALTER DEFAULT PRIVILEGES ... REVOKE ...;After the migration is complete, reapply the default privileges on the destination instance:
ALTER DEFAULT PRIVILEGES ... GRANT ...;
Non-empty system tables (pg_parameter_acl and pg_db_role_setting)
Warning message:
warning: Invalid system tables: [pg_parameter_acl, pg_db_role_setting], these system tables should be empty.Impact:
pg_parameter_aclrecords per-user access permissions for kernel parameters. ApsaraDB RDS for PostgreSQL manages these permissions internally, so source entries cannot be applied to the destination.pg_db_role_settingrecords per-database, per-role default parameter values. These settings will not carry over correctly if the tables are not cleared before migration.
Solution:
Clear both system tables on the source instance:
DELETE FROM pg_parameter_acl; DELETE FROM pg_db_role_setting;After the DR deployment is complete, configure the default permissions of the users on different databases in the destination instance.
Check reserved role permission
Check content: Check whether disallowed reserved role permissions are granted to accounts in the source instance.
Error message:
error: some disallowed reserved roles [pg_write_server_files] are granted to user. you should revoke these roles from their membersImpact: ApsaraDB RDS for PostgreSQL restricts certain built-in roles — such as pg_write_server_files — because they provide access to server file system operations that are not permitted in a managed environment. If these roles are granted to accounts in the source instance, the migration will fail.
Solution:
Revoke the disallowed reserved roles from all accounts in the source instance. For example:
REVOKE pg_write_server_files FROM "user";