Determine whether a disk is full
When the disk space of a compute node or coordinator node reaches its limit, the entire instance is locked.
Check whether an instance is locked
Connect to the instance and run the following command to check whether the instance is locked:
show rds_force_trans_ro_non_sup;
If the value of rds_force_trans_ro_non_sup
is on
in the response, the instance is locked and in the read-only state.
Clear data
When an instance is locked because the disk is full, TRUNCATE, DROP and GRANT operations are still supported on data tables. You can use these operations to clear data until the disk space falls within the threshold. Then, the instance is automatically unlocked within about five minutes.
You can also execute the following statement to query the table size:
select pg_size_pretty(pg_total_relation_size('test'));