public inbox for [email protected]  
help / color / mirror / Atom feed
From: Koshino Taiki <[email protected]>
To: Luca Ferrari <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: doubt about backend max_connections
Date: Thu, 12 Feb 2026 01:17:45 +0000
Message-ID: <TY4PR01MB1737422543D5DF7DF9740D42D9460A@TY4PR01MB17374.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAKoxK+5B1GvxxYr6FatRq6VWi_4XM3NJxumQ+LYpEwFc-ekOmA@mail.gmail.com>
References: <CAKoxK+5B1GvxxYr6FatRq6VWi_4XM3NJxumQ+LYpEwFc-ekOmA@mail.gmail.com>

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




reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: doubt about backend max_connections
  In-Reply-To: <TY4PR01MB1737422543D5DF7DF9740D42D9460A@TY4PR01MB17374.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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