Failed to Create or Delete a Database
Symptom
After CREATE DATABASE or DROP DATABASE fails in a distributed system, file directories or linked files of the database may remain on some nodes, affecting the normal use and rebuilding of the database. The database information of the node is missing. As a result, residual transactions fail to be cleared, blocking the system.
Possible Causes
The network is abnormal or the operation is terminated during the execution.
Handling Procedure
- Run the \l command on each CN of the cluster to view the database list and find out the residual databases.
- Perform the DROP DATABASE operation to clear residual files. For example:
1
DROP DATABASE if exists db333;
- If DROP DATABASE if exists cannot completely clear the residual files, manually delete the corresponding directories and files.
- If residual files still exist on a node, connect to the corresponding CN and clear them. xxx indicates the node name, and A indicates the database name.
1
EXECUTE DIRECT ON(xxx)'DROP DATABASE A';
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