Storage Autogrow and Online Disk Scaling in Azure PostgreSQL Flexible Server – Public Preview

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

 

In today's rapidly evolving digital landscape, businesses face continuously changing data storage requirements. It has become crucial to have flexible and scalable solutions in place to adapt to these evolving needs. Many customers initially start with smaller databases, but as their data grows, it eventually consumes all available storage. This often leads to the database becoming read-only, as there is no space left for new transactions. To address this challenge, two important capabilities are needed, Online disk Scaling and Storage auto-grow. Online disk scaling ensures that server restart is not needed when expanding a disk, enabling seamless scalability without interruptions. Storage auto-grow automatically scales the disk when storage capacity is running low, ensuring that your server always has sufficient storage without any downtime or disruptions.  

 

We are excited to announce that storage auto-grow and online disk scaling for Azure Database for PostgreSQL - Flexible Server - are now available in public preview across all commercial Azure regions. In this blog, we will delve into the benefits and functionalities of storage auto-grow and online disk scaling. We will explore how these features empower you to achieve seamless scalability for your Azure PostgreSQL databases, allowing you to effectively manage your growing data storage requirements. 

 

Online Disk Scaling

 

One of the primary obstacles that Azure Database for PostgreSQL Flexible Server customers faced in the past was the need to restart servers during disk scaling operations. However, starting today, most disk scaling operations no longer need service restarts. This enhancement enables customers to expand disks online without any impact on their business operations. This feature ensures that scaling operations for your PostgreSQL Flexible Server, in most cases, do not cause any downtime, with the exception mentioned below. 

 

Online Disk Scaling is a valuable feature that eliminates the need for server restarts and is particularly beneficial for storage auto-grow. It relies on this feature to perform online scaling operations, ensuring uninterrupted availability of the PostgreSQL Flexible Server. This enhancement brings substantial advantages to users of Azure Database for PostgreSQL Flexible Server. By removing the requirement for server restarts during disk scaling operations, customers can seamlessly expand their disks online, ensuring smooth scaling without any disruptions. This improvement further strengthens the value of storage auto-grow, enabling uninterrupted availability and efficient management of storage capacity. 

 

It is important to note that you do not need to take any action to use this feature. Azure Database for PostgreSQL Flexible service has enabled this capability for all regions, allowing customers to benefit from online disk scaling without any server restarts in most cases. 

 

The below image depicts the disk scaling experience before and after the recent improvement, highlighting the elimination of the need for a server restart during disk scaling operations. In the earlier experience, when you scaled the disk from 128 GiB to 1 TiB, you would receive a server restart message. However, with the new and enhanced experience, you no longer receive that message because the server restart now happens seamlessly online, thanks to this feature. 

 

Blog post image.jpg

 

 

Exception: Disk scaling operations are always online except in specific scenarios involving the 4096 GiB boundary. These scenarios include reaching, starting at, or crossing the 4096 GiB limit, such as when scaling from 2048 GiB to 8192 GiB etc. This limitation is due to an underlying Azure Managed disk V1 which needs a manual disk scaling operation.  

 

 

Storage Auto-grow 

 

In Azure Database for PostgreSQL Flexible Server, enabling the storage auto-grow feature offers a proactive solution for managing storage capacity. With storage auto-grow enabled, your storage expands automatically without affecting your workload or incurring downtime. By configuring this feature, you mitigate the risk of your server becoming read-only due to insufficient storage. Storage auto-grow event triggers depending upon the provisioned storage for your flexible server. 

 

 For servers with less than 1 TiB of storage, auto-grow triggers when storage consumption reaches 80%. For servers with 1 TiB or more storage, auto-grow triggers 90% consumption. These thresholds ensure that your server always has ample storage available to meet your growing demands. 

 

To better understand the behavior of storage auto-grow, let's consider an example. Suppose you have allocated 256 GiB of storage for your Azure Database for PostgreSQL Flexible Server and enabled storage auto-grow. When the utilization reaches 80% (205 GB), the server's storage size automatically increases to the next available premium disk tier, which is 512 GiB. However, if the disk size is 1 TiB or larger, the scaling process begins when the utilization reaches 922 GiB, and the disk is scaled upto 2 TiB. This automated scaling mechanism ensures that your storage capacity aligns with the growth of your database, eliminating the need for manual intervention. 

 

Benefits: 

Managing unpredictable workloads, particularly in terms of storage capacity planning, can be challenging. Enabling storage auto-grow proves exceptionally valuable in such scenarios. The feature intelligently detects low free space conditions and scales up the storage accordingly. With auto-grow in place, you can focus on your business operations, knowing that your storage will seamlessly adapt to accommodate increasing data volumes. Whether you are dealing with predictable or unpredictable workloads, storage auto-grow offers a proactive approach to storage management. 

 

Storage auto-grow can be enabled during server provisioning or later by accessing the Compute + Storage blade from your Azure Database for PostgreSQL Flexible Server. 

 

 

SAG.jpg

 

 

Limitations: 

 

  1. Storage auto-grow only supports scaling up, not down. Once your storage has expanded, it cannot be reduced in size. Therefore, it is crucial to allocate storage capacity based on your projected needs and growth expectations. If you have scenarios that cause uncontrolled WAL growth, then the only option is to perform a PITR as PostgreSQL does not support shrink operation on the database.
  2. Storage auto-grow currently does not work for HA / Read replica-enabled servers and we are going to support this very soon. 

 

 

Summary 

 
In this post, I explained storage auto-grow and online disk scaling for Azure Database for PostgreSQL flexible server and its benefits. To learn more about this feature please go through storage auto-grow documentation.  

 

We are always eager to get your feedback, please reach out via email to Ask Azure DB for PostgreSQL.   

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.