tencent cloud

TencentDB for PostgreSQL

Connection Pool Overview

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-08-27 16:13:03
AI翻訳・品質チェック済み
This document describes the connection pool feature of the database proxy for TencentDB for PostgreSQL.

Connection Pool Types

The connection pool type of the database proxy for TencentDB for PostgreSQL is transaction-level connection pool, which is mainly used to reduce the number of business connections directly connected to the database and to reduce the overload caused by frequent connection establishment in short connection scenarios.

Must-Knows

Currently, the connection pool feature does not support different permissions for the same account with different IPs, which may cause permission errors during connection reuse. For example, mt@test123 is granted permissions on database_a, while mt@test456 has no permissions on database_a. Enabling the connection pool may cause permission errors.
The connection pool feature refers to the connection pool feature of the database proxy. It does not affect the connection pool feature of the client. If your client already supports connection pooling, you do not need to use the connection pool feature of the database proxy.

Prerequisites

Introduction to Transaction-Level Connection Pooling


After the connection pool is enabled, client requests first establish connections with the database proxy of TencentDB for PostgreSQL. The database proxy does not immediately create backend database connections. Instead, it prioritizes matching available connections from the transaction-level connection pool. The conditions for matching available connections between new requests and the connection pool require that User, DBName, and DB are exactly the same. If matching fails, the database proxy creates a new database connection. If matching succeeds, the connection is directly reused. After a transaction is committed, the connection is released back to the pool for reuse by subsequent requests. This mechanism effectively reduces the total number of connections between the database proxy and the database.
Connection locking scenarios (scenarios where connections cannot be reused):
Create a temporary table.
Send a large packet request.
Execute the LOCK TABLE statement.
Execute the PREPARE statement.

References

For instructions on configuring the connection pool, see Enabling and Disabling the Connection Pool Feature.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック