tencent cloud

Data Transfer Service

Account Conflict Check

PDF
Focus Mode
Font Size
Last updated: 2026-04-20 17:09:32

Checking Details

In migration scenarios, check whether there are duplicate users in the target database and the source database.

Fixing Methods

During the migration of an entire instance, if accounts with identical names to those in the source instance exist in the target instance, delete the accounts from the target instance.
1. Use the initialization account to log in to the database and execute the following statements:
create user new user with password 'password';
# Optional operation: Ensure that the new user and conflicting user have consistent permissions. pg_tencentdb_superuser is a TencentDB instance; replace it as needed based on your actual situation.
grant pg_tencentdb_superuser to new username;
alter user new user with CREATEDB;
alter user new user with CREATEROLE;
2. Use the initialization account to log in to the database and delete the conflicting user.
drop user conflicting user;
# If the conflicting user has resource dependencies, first modify the owner of dependent objects. For example, run the following statement to change the owner of a table:
alter table table name owner to new user;
After the conflicting user is deleted, execute the check task again.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback