APPLIES TO: Azure Database for PostgreSQL - Flexible Server
The following sections describe capacity and functional limits in Azure Database for PostgreSQL flexible server. If you'd like to learn about resource (compute, memory, storage) tiers, see the compute and storage articles.
Maximum connectionsThe following table shows the default maximum number of connections for each pricing tier and vCore configuration. Azure Database for PostgreSQL flexible server reserves 15 connections for physical replication and monitoring of the Azure Database for PostgreSQL flexible server instance. Consequently, the table reduces the value for maximum user connections by 15 from the total maximum connections.
Product name vCores Memory size Maximum connections Maximum user connections Burstable B1ms 1 2 GiB 50 35 B2s 2 4 GiB 429 414 B2ms 2 8 GiB 859 844 B4ms 4 16 GiB 1,718 1,703 B8ms 8 32 GiB 3,437 3,422 B12ms 12 48 GiB 5,000 4,985 B16ms 16 64 GiB 5,000 4,985 B20ms 20 80 GiB 5,000 4,985 General Purpose D2s_v3 / D2ds_v4 / D2ds_v5 / D2ads_v5 2 8 GiB 859 844 D4s_v3 / D4ds_v4 / D4ds_v5 / D4ads_v5 4 16 GiB 1,718 1,703 D8s_v3 / D8ds_V4 / D8ds_v5 / D8ads_v5 8 32 GiB 3,437 3,422 D16s_v3 / D16ds_v4 / D16ds_v5 / D16ads_v5 16 64 GiB 5,000 4,985 D32s_v3 / D32ds_v4 / D32ds_v5 / D32ads_v5 32 128 GiB 5,000 4,985 D48s_v3 / D48ds_v4 / D48ds_v5 / D48ads_v5 48 192 GiB 5,000 4,985 D64s_v3 / D64ds_v4 / D64ds_v5 / D64ads_v5 64 256 GiB 5,000 4,985 D96ds_v5 / D96ads_v5 96 384 GiB 5,000 4,985 Memory Optimized E2s_v3 / E2ds_v4 / E2ds_v5 / E2ads_v5 2 16 GiB 1,718 1,703 E4s_v3 / E4ds_v4 / E4ds_v5 / E4ads_v5 4 32 GiB 3,437 3,422 E8s_v3 / E8ds_v4 / E8ds_v5 / E8ads_v5 8 64 GiB 5,000 4,985 E16s_v3 / E16ds_v4 / E16ds_v5 / E16ads_v5 16 128 GiB 5,000 4,985 E20ds_v4 / E20ds_v5 / E20ads_v5 20 160 GiB 5,000 4,985 E32s_v3 / E32ds_v4 / E32ds_v5 / E32ads_v5 32 256 GiB 5,000 4,985 E48s_v3 / E48ds_v4 / E48ds_v5 / E48ads_v5 48 384 GiB 5,000 4,985 E64s_v3 / E64ds_v4 / E64ds_v5 / E64ads_v5 64 432 GiB 5,000 4,985 E96ds_v5 / E96ads_v5 96 672 GiB 5,000 4,985The reserved connection slots, presently at 15, can change. We advise regularly verifying the total reserved connections on the server. You calculate this number by summing the values of the reserved_connections
and superuser_reserved_connections
server parameters. The maximum number of available user connections is max_connections
- (reserved_connections
+ superuser_reserved_connections
).
The system calculates the default value for the max_connections
server parameter when you provision the instance of Azure Database for PostgreSQL flexible server, based on the product name that you select for its compute. Any subsequent changes of product selection to the compute that supports the flexible server won't have any effect on the default value for the max_connections
server parameter of that instance. We recommend that whenever you change the product assigned to an instance, you also adjust the value for the max_connections
parameter according to the values in the preceding table.
When you first set up your Azure Database for Postgres flexible server instance, it automatically decides the highest number of connections that it can handle concurrently. Your server's configuration determines this number and you can't change it.
However, you can use the max_connections
setting to adjust how many connections are allowed at a particular time. After you change this setting, you need to restart your server for the new limit to start working.
Caution
Although it's possible to increase the value of max_connections
beyond the default setting, we advise against it.
Instances might encounter difficulties when the workload expands and demands more memory. As the number of connections increases, memory usage also rises. Instances with limited memory might face issues such as crashes or high latency. Although a higher value for max_connections
might be acceptable when most connections are idle, it can lead to significant performance problems after they become active.
If you need more connections, we suggest that you instead use PgBouncer, the built-in Azure solution for connection pool management. Use it in transaction mode. To start, we recommend that you use conservative values by multiplying the vCores within the range of 2 to 5. Afterward, carefully monitor resource utilization and application performance to ensure smooth operation. For detailed information on PgBouncer, see PgBouncer in Azure Database for PostgreSQL flexible server.
When connections exceed the limit, you might receive the following error:
FATAL: sorry, too many clients already.
When you're using Azure Database for PostgreSQL flexible server for a busy database with a large number of concurrent connections, there might be a significant strain on resources. This strain can result in high CPU utilization, especially when many connections are established simultaneously and when connections have short durations (less than 60 seconds). These factors can negatively affect overall database performance by increasing the time spent on processing connections and disconnections.
Each connection in Azure Database for PostgreSQL flexible server, regardless of whether it's idle or active, consumes a significant amount of resources from your database. This consumption can lead to performance issues beyond high CPU utilization, such as disk and lock contention. The Number of Database Connections article on the PostgreSQL Wiki discusses this article in more detail. To learn more, see Identify and solve connection performance in Azure Database for PostgreSQL flexible server.
Functional limitationsThe following sections list considerations for what is and isn't supported in Azure Database for PostgreSQL flexible server.
Scale operationsstorage 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.postgres_fdw
. You can't restrict this access. Servers in virtual networks can have restricted outbound access through network security groups.contrib
extensions and more. For more information, see PostgreSQL extensions.The system manages backups. You currently can't run backups manually. We recommend using pg_dump
instead.
The first snapshot is a full backup, and consecutive snapshots are differential backups. The differential backups back up only the changed data since the last snapshot backup.
For example, if the size of your database is 40 GB and your provisioned storage is 64 GB, the first snapshot backup is 40 GB. Now, if you change 4 GB of data, the next differential snapshot backup size will be only 4 GB. The transaction logs (write-ahead logs) are separate from the full and differential backups, and they're archived continuously.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4