Deleting a User
Background
- When running the DROP USER command to delete a user, you must use CASCADE to delete objects (except databases) that depend on the user. A user's locked objects can be deleted only after they are unlocked or the process that locks them is stopped.
- A user on which databases depend can be deleted only after the databases are deleted. This is because databases are large objects and directly deleting them using CASCADE are risky.
- In MOTService, the enable_kill_query parameter can be configured to determine whether to forcibly stop the process that locks a user's cascading objects to delete the user.
- If it is set to true and CASCADE is used to delete a user, the system forcibly stops the process that locks the user's objects by default.
- If it is set to false and CASCADE is used to delete a user, the system waits until the process that locks the user's cascading objects ends before deleting the user.
Procedure
- Log in to FusionInsight Manager, choose Cluster > Services > MOTService, click Instance, and view and record the service IP address of the MOTServer(Active) instance.
- Log in to the active MOTService node as user omm and run the following command to start environment variables:
source ${MOTSERVER_HOME}/.motservice_profile
- Run the following command to connect to the MOTService database and enter the password of user omm:
gsql -d postgres -p 20105
Contact the system administrator to obtain the password of user omm for the MOTService database.
- Delete a user.
For example, to delete the user joe, run the following command:
DROP USER joe CASCADE;
If the following information is displayed, the user has been successfully deleted:
DROP ROLE
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot