[pgpool-hackers: 4016] Re: Proposal: add connection count to pcp_proc_info and show pool_process
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Sep 7 14:24:01 JST 2021
>> Actually I expected that "remaining" shows the remaining time before
>> client_idle_limit expires. Suppose client_idle_limit = 300. If clent
>> is idle for 100 seconds, "remaining" should be 300 - 100 = 200 seconds
>> = 3:20.
>>
>> You can caliculate the value by:
>> pool_config->client_idle_limit - backend->info->client_idle_duration.
>
> I misunderstood "remaining" means.
> I changed the way of caloculating "remaining" and that If a connection is in IDLE state, the
> "remaining" of the other connection in the same process show the same time.
> Is this your expected one?
Yes. (I assume that in the example below client_idle_limit is 300 seconds).
BTW, if client_idle_limit = 0, what will show? Something like "(remaining: 0:00)"?
> postgres=# show pool_pools;
> pool_pid | start_time | client_connection_count | pool_id | backend_id | database | username | ... | client_idle_duration
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 0 | 0 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 0 | 1 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 1 | 0 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 1 | 1 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 2 | 0 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 2 | 1 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 3 | 0 | | | ... | 0
> 3728 | 2021-09-07 02:29:38 (remaining: 5:00) | 0 | 3 | 1 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 0 | 0 | postgres | postgres | ... | 90
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 0 | 1 | postgres | postgres | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 1 | 0 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 1 | 1 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 2 | 0 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 2 | 1 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 3 | 0 | | | ... | 0
> 3729 | 2021-09-07 02:29:38 (remaining: 3:30) | 1 | 3 | 1 | | | ... | 0
>
> --
> KAWAMOTO Masaya <kawamoto at sraoss.co.jp>
> SRA OSS, Inc. Japan
More information about the pgpool-hackers
mailing list