tencent cloud

TencentDB for PostgreSQL

Account Conflict Check

フォーカスモード
フォントサイズ
最終更新日: 2024-11-04 10:19:28

Check Details

In migration scenarios, check whether the target database user conflicts with the source database user.

Fixing Method

In full instance migration, if the target instance has the same account as that in the source instance, you need to delete the account with the same name in the target instance.
If the account in the target database is an initialization account, use the initialization account to log in to the database and run the following statements:
create user new user with password 'password';
grant pg_tencentdb_superuser to new username;
alter user new user with CREATEDB;
alter user new user with CREATEROLE;
If the account in the target database is a new user, use the newly created user to log in to the database and delete the conflicting user.
drop user conflicting user;
# If the conflicting user has resource dependencies, run the following statement to modify the owner of the resources first (with a table as an example below):
alter table table name owner to new user;
After the conflicting user is deleted, perform the verification task again.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック