[pgpool-general: 4283] Re: Pgpool - connection hangs in DISCARD ALL

Tatsuo Ishii ishii at postgresql.org
Mon Jan 4 10:29:43 JST 2016

> On 31.12.2015 10:50, Tatsuo Ishii wrote:
>>> Yes, reconfigured. Keep you up2date. Any fix for the logic possible?
>> Yes, I'm thinking now.
> Still hangs even with child_max_connections = 0, same stack trace.

Too bad. I'm going to look for other causes if any.

>>> BTW: Maybe this has already been discussed but if I understood it
>>> correctly there is no global pool available.
>>> http://www.pgpool.net/mediawiki/index.php/FAQ#Why_max_connection_must_satisfy_this_formula_max_connection_.3E.3D_.28num_init_children_.2A_max_pool.29_and_not_max_connection_.3E.3D_num_init_children.3F
>>> That means if the wrong client is selected a new backend connection is
>>> opened. Even when another idle client would have another idle backend
>>> already opened.
>>> Wouldn't it be better to have a global backend pool?
>>> Also ressource usage is much higher (num_init_children * max_pool).
>> Not really unless you want to open many pair of user and database
>> concurrently.  (remember that each pool is assigned to different
>> combination of user and database pair. If there's only one such that
>> combination, the number of necessary pool is 1).
> But each pool can handle only one client connection, right?. Therefore
> when multiple client connections are necessary (e.g. web application)
> with different username/database connections and the wrong connection
> is selected a new backend connection will be opened, right? Maybe you
> can clarify this.

Do web applications use different username/database pair for each
session? As far as I know, it sounds unusual.

>>> Any ideas on that or possible changes?
>> One idea is, when a client connects to one of pgpool child process and
>> it has not opened requested connection yet, and there's other pgpool
>> child process has an idle and requested connection, we could move the
>> fd to the requested process by using a technique so called "file
>> descriptor passing".
>> Question is, in a long run, each child process is likely to have same
>> set of user and database. If so, above technique is useless and it
>> just adds unnecessary complexity.
> Which syscalls are involved in file descriptor passing?

sendmsg() and recvmsg().

Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

More information about the pgpool-general mailing list