使用 Azure 门户在 Azure Database for PostgreSQL(单一服务器)中自动增长存储Auto grow storage using the Azure portal in Azure Database for PostgreSQL - Single Server

本文介绍如何将 Azure Database for PostgreSQL 服务器存储配置为在不影响工作负荷的情况下增长。This article describes how you can configure an Azure Database for PostgreSQL server storage to grow without impacting the workload.

在服务器达到了分配的存储限制时,该服务器将被标记为只读。When a server reaches the allocated storage limit, the server is marked as read-only. 但是,如果你启用存储自动增长,则服务器存储会增长,以容纳不断增加的数据。However, if you enable storage auto grow, the server storage increases to accommodate the growing data. 对于预配的存储大小小于 100 GB 的服务器,可用存储空间一旦小于 1 GB 或预配存储的 10%(以这二者中的较大值为准),预配的存储大小就会立即增加 5 GB。For servers with less than 100 GB provisioned storage, the provisioned storage size is increased by 5 GB as soon as the free storage is below the greater of 1 GB or 10% of the provisioned storage. 对于预配的存储大小大于 100 GB 的服务器,可用存储空间小于预配的存储大小的 5% 时,预配的存储大小就会增加 5%。For servers with more than 100 GB of provisioned storage, the provisioned storage size is increased by 5% when the free storage space is below 5% of the provisioned storage size. 此处所指定的最大存储限制适用。Maximum storage limits as specified here apply.

先决条件Prerequisites

若要完成本操作指南,需要:To complete this how-to guide, you need:

启用存储自动增长Enable storage auto grow

请按照下列步骤设置 PostgreSQL 服务器存储自动增长:Follow these steps to set PostgreSQL server storage auto grow:

  1. Azure 门户中,选择 Azure Database for PostgreSQL 服务器。In the Azure portal, select your Azure Database for PostgreSQL server.

  2. 在 PostgreSQL 服务器页上,单击“设置” 下的“定价层” ,以打开“定价层”页。On the PostgreSQL server page, under Settings, click Pricing tier to open the pricing tier page.

  3. 在“自动增长”部分中,选择“是” 以启用存储自动增长。In the Auto-growth section, select Yes to enable storage auto grow.

    Azure Database for PostgreSQL - Settings_Pricing_tier - 自动增长

  4. 单击“确定”以保存更改 。Click OK to save the changes.

  5. 此时将显示一则通知,确认自动增长已成功启用。A notification will confirm that auto grow was successfully enabled.

    Azure Database for PostgreSQL - 自动增长成功

后续步骤Next steps

了解如何基于指标创建警报Learn about how to create alerts on metrics.