[pgpool-general: 4283] Re: Pgpool - connection hangs in DISCARD ALL
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.
>>> 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().
SRA OSS, Inc. Japan
More information about the pgpool-general