PolarDB for PostgreSQL (Compatible with Oracle) imposes two categories of limits: limits specific to PolarDB's cloud environment, and limits inherited from the PostgreSQL kernel. Review these limits before designing your schema or planning your cluster capacity to avoid operational issues.
PolarDB limits
The following limits apply specifically to PolarDB for PostgreSQL (Compatible with Oracle) to ensure stability, security, and resource isolation in a multi-tenant environment.
Maximum number of files
Each cluster has a maximum file count based on its node specification. When this limit is reached, you cannot create new tables or indexes, and PolarDB returns the error could not create file.
File count by node specification
| Node specification | Maximum number of files |
|---|---|
| polar.o.x4.medium | 1,048,576 |
| polar.o.x4.large | 2,097,152 |
| polar.o.x4.xlarge | 2,097,152 |
| polar.o.x8.xlarge | 4,194,304 |
| polar.o.x8.2xlarge | 8,388,608 |
| polar.o.x8.4xlarge | 12,582,912 |
| polar.o.x8.12xlarge | 20,971,520 |
What counts toward the limit
The total includes user table files, database system table files, index files, and log files. A standard non-partitioned table uses three files: a data file, a Free Space Map (FSM) file, and a Visibility Map (VM) file. Each index on the table adds one more file.
What to do when you approach the limit
Delete unused tables or indexes to free up file slots.
Upgrade your node specification to a higher tier with a larger file limit.
Feature and permission limits
| Feature | Constraint | Details |
|---|---|---|
| Database permissions | superuser is not available | PolarDB provides the polar_superuser role instead, which is a privileged account. This role is a subset of the superuser permissions and meets most daily management needs. |
PostgreSQL limits
PolarDB inherits the internal limits defined by the PostgreSQL kernel. The following table covers the core limits that are stable across PostgreSQL versions and most relevant during database design.
For the complete list, see PostgreSQL 14 limits.
| Limit | Value | Notes |
|---|---|---|
| Database size | 500 TB | Default maximum. The actual capacity depends on your cluster specification. |
| Table size | 32 TB | Based on the default 8 KB block size (BLCKSZ). |
| Columns per table | 1,600 | Theoretical maximum. The actual number depends on the data types used — a single row (excluding TOAST values) cannot exceed one data page (~8 KB). Using fixed-width data types such as bigint significantly reduces the column limit. For optimal performance, keep column counts under 250. |
| Field size | 1 GB | Applies to variable-length types such as text, jsonb, and bytea. Values exceeding the page size are stored out of line using the TOAST mechanism. |
| Identifier length | 63 bytes | The maximum length for database object names such as tables and columns. Longer names are silently truncated, which can cause unexpected behavior. |
| Indexes per table | Unlimited | No theoretical limit. In practice, the number of indexes is constrained by storage space, the cluster file limit, and system resources. |
| Columns per index | 32 | Maximum number of columns in a single index. |
| Partition key columns | 32 | Maximum number of columns in a partition key when creating a partitioned table. |
| Function arguments | 100 | Maximum number of arguments for a user-defined function. |
| Query parameters | 65,535 | Maximum number of parameter markers (such as $1, $2) in a single query. |