public inbox for [email protected]  
help / color / mirror / Atom feed
doubt about backend max_connections
3+ messages / 2 participants
[nested] [flat]

* doubt about backend max_connections
@ 2026-02-09 09:52  Luca Ferrari <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Luca Ferrari @ 2026-02-09 09:52 UTC (permalink / raw)
  To: [email protected]

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: doubt about backend max_connections
@ 2026-02-12 01:17  Koshino Taiki <[email protected]>
  parent: Luca Ferrari <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Koshino Taiki @ 2026-02-12 01:17 UTC (permalink / raw)
  To: Luca Ferrari <[email protected]>; +Cc: [email protected] <[email protected]>

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<[email protected]>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Luca Ferrari <[email protected]>
送信日時: 2026年2月9日 18:52
宛先: [email protected] <[email protected]>
件名: 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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: doubt about backend max_connections
@ 2026-02-13 11:07  Luca Ferrari <[email protected]>
  parent: Koshino Taiki <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Luca Ferrari @ 2026-02-13 11:07 UTC (permalink / raw)
  To: Koshino Taiki <[email protected]>; +Cc: [email protected] <[email protected]>

On Thu, Feb 12, 2026 at 2:17 AM Koshino Taiki <[email protected]> wrote:
>
> 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.
>

Thanks, it is clear now.

> 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.
>

I didn't know this, thank you very much for pointing out.

Luca






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-02-13 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09 09:52 doubt about backend max_connections Luca Ferrari <[email protected]>
2026-02-12 01:17 ` Koshino Taiki <[email protected]>
2026-02-13 11:07   ` Luca Ferrari <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox