@Sachin Soam Thank you for reaching out.
Decreasing server storage size is currently not supported. The only way to do is dump and restore it to a new Azure Database for PostgreSQL flexible server instance.
After you configure the storage size, you can't reduce it. You have to create a new server with the desired storage size, perform a manual dump and restore operation, and migrate your databases to the new server.
When the storage usage reaches 95% or if the available capacity is less than 5 GiB (whichever is more), the server is automatically switched to read-only mode to avoid errors associated with disk-full situations. In rare cases, if the rate of data growth outpaces the time it takes to switch to read-only mode, your server might still run out of storage. You can enable storage auto grow to avoid these issues and automatically scale your storage based on your workload demands.
We recommend setting alert rules for storage used
or storage percent
when they exceed certain thresholds so that you can proactively take action such as increasing the storage size. For example, you can set an alert if the storage percentage exceeds 80% usage.
For the migration part you mentioned above, migration from one Azure PostgreSQL Flexible Server to another is not available. DMS does not support that.
The issue occurred when the database on auto-grow and the storage consumption suddenly increased from 50% to 100%.
Storage autogrow using Azure portal in Azure Database for PostgreSQL - Flexible Server