Re: doubt about backend max_connections

From: Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>
Cc: "pgpool-general(at)lists(dot)postgresql(dot)org" <pgpool-general(at)lists(dot)postgresql(dot)org>
Subject: Re: doubt about backend max_connections
Date: 2026-02-12 01:17:45
Message-ID: TY4PR01MB1737422543D5DF7DF9740D42D9460A@TY4PR01MB17374.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-general

Hi,

The value num_init_children × max_pool applies per backend,
so every backend will receive max_pool × num_init_children connections from Pgpool-II.

Please make sure that the number of connections from Pgpool-II does not exceed the maximum number of connections that each backend node can accept. Therefore, these values should satisfy one of the following formulas:
When query cancellation is not considered:

max_pool × num_init_children ≤ (max_connections − superuser_reserved_connections)
When query cancellation is considered:

max_pool × num_init_children × 2 ≤ (max_connections − superuser_reserved_connections)
Because Pgpool-II opens additional connections to send cancel requests, the second formula is safer when query cancellation may occur.

Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Luca Ferrari <fluca1978(at)gmail(dot)com>
送信日時: 2026年2月9日 18:52
宛先: pgpool-general(at)lists(dot)postgresql(dot)org <pgpool-general(at)lists(dot)postgresql(dot)org>
件名: doubt about backend max_connections

Hi all,
I've a doubt about configuring max_pool and num_init_children and,
subsequently, PostgreSQL max_connections.
In <https://www.pgpool.net/docs/46/en/html/runtime-config-connection-pooling.html>
there is this sentence "Please be aware that the number of connections
from Pgpool-II processes to the backends may reach num_init_children *
max_pool in total. " regarding max_pool.
Now, my doubt is: does this apply to all the backends (i.e., every
backend will receive a max_pool * num_init_children connections or
dows it apply "cluster wise", so every node will receive
num_init_childre * max_pool * num_of_backends_in_pgpool?
Seems to me the former, but I want to be sure.

Thansk,
Luca

In response to

Responses

Browse pgpool-general by date

  From Date Subject
Next Message Luca Ferrari 2026-02-13 11:07:42 Re: doubt about backend max_connections
Previous Message Luca Ferrari 2026-02-09 09:52:03 doubt about backend max_connections