All Products
Search
Document Center

PolarDB:Limits

Last Updated:Sep 29, 2025

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 superuser permission is not available.

Instead, the system provides the polar_superuser role, which is a privileged account. This role is a subset of the superuser permission and is sufficient for most daily administrative tasks.

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:

  • Centralized cluster: The default maximum storage is 500 TB. The actual capacity is limited by your cluster specifications.

  • Distributed cluster: The storage space is theoretically unlimited.

Maximum table size

32 TB

This is the effective upper limit based on the default 8 KB block (BLCKSZ) size.

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 bigint significantly reduces the maximum number of columns. For optimal performance, keep the number of columns below 250.

Maximum field size

1 GB

This limit applies to variable-length types such as text, jsonb, and bytea. Their storage relies on the TOAST mechanism, which stores oversized values out of line.

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 $1 and $2, that can be used in a single query.