An Error Is Reported When the TRUNCATE Command Is Executed on the System Table gs_wlm_session_info
Symptom
The size of the system table pg_catalog.gs_wlm_session_info is large (about 20 GB). When the truncate command is executed on the system table without querying historical SQL statements, "permission denied for relation gs_wlm_session_info" is reported.
Possible Causes
Only clusters of version 8.0.x or later support the TRUNCATE command for system catalogs.
To check the cluster version, log in to the DWS console and click Cluster List under Cluster. Click the name of the target cluster to view its details.
Handling Procedure
- To clear system tables for cluster versions earlier than 8.0, run DELETE FROM and then VACUUM FULL.
The following uses the gs_wlm_session_info system table as an example:
1 2
DELETE FROM pg_catalog.gs_wlm_session_info; VACUUM FULL pg_catalog.gs_wlm_session_info;
- For clusters of version 8.0 or later, run the following command to clear system catalogs:
1
TRUNCATE TABLE dbms_om.gs_wlm_session_info;
This system table schema in this example is dbms_om.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.