To ensure stability and performance, PolarDB for PostgreSQL has specific limits on resource usage and features. This document describes these limits to help you design your applications and manage your databases effectively, preventing operational issues that can arise from exceeding them.
This product is subject to limits specific to PolarDB in a cloud environment, along with general limits inherited from the PostgreSQL kernel.
PolarDB-specific limits
The following rules are unique to PolarDB for PostgreSQL. These rules are in place to ensure stability, security, and resource fencing in a multitenancy environment.
Maximum number of files
PolarDB for PostgreSQL limits the total number of files that can be created in a single cluster. This limit is directly related to the cluster's node specifications. If the number of files reaches this limit, you cannot create new data tables or indexes, and you will receive a could not create file error.
File composition: The total number of files includes user table files, database system table files, index files, and log files. A regular non-partitioned table typically uses three files: a data file, a Free Space Map (FSM) file, and a Visibility Map (VM) file. If the table has indexes, each index requires one additional file.
Solutions: If your cluster reaches the file limit, delete unused tables or indexes to free up resources. You can also upgrade the configurationsupgrade the configurations to increase the limit.
Limits for each specification:
Node specifications
Maximum number of files
polar.pg.x4.medium
1048576
polar.pg.x4.large
2097152
polar.pg.x4.xlarge
2097152
polar.pg.x8.xlarge
4194304
polar.pg.x8.2xlarge
8388608
polar.pg.x8.4xlarge
12582912
polar.pg.x8.12xlarge
20971520
Feature and permission limits
Item | Limit | Description |
Database permissions | The | Instead, the system provides the |
Inherited PostgreSQL limits
As a cloud database based on PostgreSQL, PolarDB also inherits the internal limits of the PostgreSQL kernel for database objects. The following table lists the core limits that you should consider during database design.
Limit object | Limit value | Description |
Database size | 500 TB/Unlimited | This limit depends on the type of your PolarDB cluster:
|
Maximum table size | 32 TB | This is the effective upper limit based on the default 8 KB block ( |
Maximum columns per table | 1,600 | The theoretical limit is 1,600. However, the actual number of available columns depends on the sum of the data types of all columns. A single row, excluding TOAST values, cannot exceed one data page (about 8 KB). Using wide data types such as |
Maximum field size | 1 GB | This limit applies to variable-length types such as |
Identifier length | 63 bytes | This is the maximum length for the names of database objects, such as tables and columns. Longer names are silently truncated, which can cause unexpected behavior. |
Maximum indexes per table | Unlimited | Theoretically, there is no upper limit. The actual number of indexes that you can create is limited by storage space, the maximum number of files, and system resources. |
Index columns | 32 | The maximum number of columns that can be included in a single index. |
Partition key columns | 32 | The maximum number of columns that can be included in a partition key when you create a partitioned table. |
Function parameters | 100 | The maximum number of parameters for a user-defined function. |
Query parameters | 65,535 | The maximum number of parameter markers, such as |