Help Center/ Relational Database Service_RDS for PostgreSQL/ FAQs/ Database Connection/ What Is the Maximum Number of Connections to an RDS for PostgreSQL Instance?
Updated on 2025-06-24 GMT+08:00

What Is the Maximum Number of Connections to an RDS for PostgreSQL Instance?

RDS for PostgreSQL does not have constraints on how many connections are supported. It depends on the default values and value ranges of certain parameters in your DB engine.

Definition

The maximum number of connections refers to the concurrent connections allowed for a DB instance.

How to Change It

  • You can change the maximum number of connections allowed on the console. For details, see Modifying Parameters of an RDS for PostgreSQL Instance.
  • You can run the following command to query the maximum number of connections allowed:
    show max_connections;

    If you want to change the maximum number of connections by running commands, submit a service ticket to apply for required permissions.

Setting the Maximum Number of Connections to an Appropriate Value

The max_connections parameter is closely related to the memory (GB) of the DB instance. The calculation formula is as follows:

Table 1 Calculation formula

Parameter

Formula

Version Involved

Unit

max_connections

min((total_mem_kb - shared_buffer) * 1024.0 / 16MB, 5000)

All versions

Count

The following table lists the default values of max_connections for different memory specifications.

Table 2 Default values of max_connections for different memory specifications

Memory (GB)

Max. Client Connections (max_connections)

512

5,000

384

5,000

256

5,000

128

5,000

64

3,072

32

1,536

16

768

8

384

4

192

2

96