[pgpool-hackers: 4015] Re: Proposal: add connection count to pcp_proc_info and show pool_process
KAWAMOTO Masaya
kawamoto at sraoss.co.jp
Tue Sep 7 14:11:42 JST 2021
Hi Ishii san,
Thank you for your comments.
> @@ -132,6 +140,9 @@ typedef struct
> int key; /* cancel key */
> int counter; /* used counter */
> time_t create_time; /* connection creation time */
> + time_t client_connection_time; /* client connection time */
> + time_t client_disconnection_time; /* client last disconnection time */
> + int client_idle_duration; /* client idle duration time(s) */
>
> It would better to have a space between "time" and "(s").
Ok.
> + 5136 | 2021-09-02 04:54:18 (remaining: 1:58) | 1 | 0 | 1 | postgres | postgres | 2021-09-02 04:55:34 | 2021-09-02 04:55:34 | 2021-09-02 04:55:32 | 0 | 3 | 0 | 1 | 5192 | 1 | Idle
>
> 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?
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 ¡÷ sraoss.co.jp>
SRA OSS, Inc. Japan
-------------- next part --------------
ʸ»ú¥³¡¼¥É»ØÄê¤Î̵¤¤ÅºÉÕʸ½ñ¤òÊݴɤ·¤Þ¤·¤¿...
̾Á°: pcp_proc_info_and_docs2.diff
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210907/377bf1a0/attachment-0001.ksh>
More information about the pgpool-hackers
mailing list