Fix pcp_proc_info, show pool_processes and show pool_pools command.
authorMasaya Kawamoto <kawamoto@sraoss.co.jp>
Wed, 6 Oct 2021 05:56:15 +0000 (05:56 +0000)
committerMasaya Kawamoto <kawamoto@sraoss.co.jp>
Wed, 6 Oct 2021 05:56:15 +0000 (05:56 +0000)
I added new fields to the result of those commands in following commit:
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=45152975fdf8d57deaff07dc6c34117fa8eeb3db

The usage of client_idle_limit was mistaken. Child processes are
restarted by child_life_time not client_idle_limit, and client_idle_limit
is related to Client idle duration and disconnects the connection.

So, I changed the display of Start time and Client idle duration.
I modify wait_for_connections function to calculate the time remaining
until the child process is restarted by child_life_time; Instead of
using child_life_time as the timeout for select(2), select(2) with 1 sec
timeout is looped through child_life_time times to get the elapsed time.

Moreover when there were multiple backends, Client idle duration was
only displayed in backend0, so I fix this too.

doc.ja/src/sgml/ref/pcp_proc_info.sgml
doc.ja/src/sgml/ref/show_pool_pools.sgml
doc.ja/src/sgml/ref/show_pool_processes.sgml
doc/src/sgml/ref/pcp_proc_info.sgml
doc/src/sgml/ref/show_pool_pools.sgml
doc/src/sgml/ref/show_pool_processes.sgml
src/include/pcp/libpcp_ext.h
src/main/pgpool_main.c
src/protocol/child.c
src/utils/pool_process_reporting.c

index ad951934475b44b0fd4a6cb42c757785dee6c48a..07eeeb77ce8b113e1c21332691621583ab721a08 100644 (file)
@@ -118,9 +118,14 @@ Pgpool-II documentation
    -->
    例を示します。
    <programlisting>
-$ pcp_proc_info -p 11001 2871
-postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:59 2021-09-07 02:16:59 273 2021-09-07 02:16:56 1 3016 1 2871 0 Idle
-postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:59 2021-09-07 02:16:59 0 2021-09-07 02:16:56 1 3017 1 2871 1 Idle
+$ pcp_proc_info -p 1100
+test postgres 2021-09-28 04:16:00 (4:56 before process restarting) 1 3 0 2021-09-28 04:16:16 2021-09-28 04:16:16 0 2021-09-28 04:16:33 1 30795 0 30750 0 Wait for connection
+test postgres 2021-09-28 04:16:00 (4:56 before process restarting) 1 3 0 2021-09-28 04:16:16 2021-09-28 04:16:16 0 2021-09-28 04:16:33 1 30796 0 30750 1 Wait for connection
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 34 (4:26 before client disconnected)  1 30763 1 30751 0 Idle
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 34 (4:26 before client disconnected)  1 30764 1 30751 1 Idle
+$ pcp_proc_info -p 11001 30751
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 58 (4:02 before client disconnected)  1 30763 1 30751 0 Idle
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 58 (4:02 before client disconnected)  1 30764 1 30751 1 Idle
    </programlisting>
   </para>
   <para>
@@ -132,13 +137,13 @@ postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:5
     <!--
     1. connected database name
     2. connected user name
-    3. process start-up timestamp (remaining time by <xref linkend="guc-client-idle-limit">. If client_idle_limit is set 0, remaining is not desplayed.)
+    3. process start-up timestamp (If <xref linkend="guc-child-life-time"> is set not 0, the time before process restarting is displayed.)
     4. process-reuse counter for <xref linkend="guc-child-max-connections">
     5. protocol major version
     6. protocol minor version
     7. connection created timestamp
     8. last client connected timestamp
-    9. client idle duration (sec) for <xref linkend="guc-client-idle-limit">
+    9. client idle duration (sec) (If <xref linkend="guc-client-idle-limit"> is set not 0, the time before client disconnected is displayed.)
     10. last client disconnected timestamp
     11. connection-reuse counter
     12. PostgreSQL backend process id
@@ -149,13 +154,13 @@ postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:5
     -->
     1. 接続先のデータベース名
     2. 接続先のユーザ名
-    3. Pgpool-IIプロセスの起動時刻 (<xref linkend="guc-client-idle-limit">による残り時間。client_idle_limitが0の場合、remainingは表示されません)
+    3. Pgpool-IIプロセスの起動時刻 (<xref linkend="guc-child-life-time">が0でない場合、プロセスが再起動されるまでの時間を表示します)
     4. プロセスの利用カウンタ(<xref linkend="guc-child-max-connections">を参照)
     5. プロトコルのメジャーバージョン
     6. プロトコルのマイナーバージョン
     7. バックエンドへの接続時刻
     8. クライアントが最後に接続開始した時刻
-    9. æ\8e¥ç¶\9aã\81\8cidleã\81¨ã\81ªã\81£ã\81¦ã\81\84ã\82\8bæ\99\82é\96\93(ç§\92)(<xref linkend="guc-client-idle-limit">ã\82\92å\8f\82ç\85§)
+    9. æ\8e¥ç¶\9aã\81\8cidleã\81¨ã\81ªã\81£ã\81¦ã\81\84ã\82\8bæ\99\82é\96\93(ç§\92)(<xref linkend="guc-client-idle-limit">ã\81\8c\81§ã\81ªã\81\84å ´å\90\88ã\80\81ã\82¯ã\83©ã\82¤ã\82¢ã\83³ã\83\88ã\81\8cå\88\87æ\96­ã\81\95ã\82\8cã\82\8bã\81¾ã\81§ã\81®æ\99\82é\96\93ã\82\92表示ã\81\97ã\81¾ã\81\99)
     10. クライアントが最後に接続終了した時刻
     11. 接続の再利用カウンタ値
     12. PostgreSQLバックエンドプロセスのプロセスID
@@ -181,38 +186,72 @@ postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:5
    <option>--verbose</option> オプションは出力内容を理解するのに役に立ちます。例:
   </para>
   <programlisting>
-$ pcp_proc_info -p 11001 --verbose 2871
-Database                  : postgres
+$ pcp_proc_info -p 11001 --verbose
+Database                  : test
 Username                  : postgres
-Start time                : 2021-09-07 02:12:53 (remaining: 3:36)
+Start time                : 2021-09-28 04:16:00 (2:52 before process restarting)
 Client connection count   : 1
 Major                     : 3
 Minor                     : 0
-Backend connection time   : 2021-09-07 02:16:59
-Client connection time    : 2021-09-07 02:16:59
-Client idle duration      : 84
-Client disconnection time : 2021-09-07 02:16:56
+Backend connection time   : 2021-09-28 04:16:16
+Client connection time    : 2021-09-28 04:16:16
+Client idle duration      : 0
+Client disconnection time : 2021-09-28 04:16:33
 Pool Counter              : 1
-Backend PID               : 3016
-Connected                 : 1
-PID                       : 2871
+Backend PID               : 30795
+Connected                 : 0
+PID                       : 30750
 Backend ID                : 0
-Status                    : Idle
+Status                    : Wait for connection
 
-Database                  : postgres
+Database                  : test
 Username                  : postgres
-Start time                : 2021-09-07 02:12:53 (remaining: 3:36)
+Start time                : 2021-09-28 04:16:00 (2:52 before process restarting)
 Client connection count   : 1
 Major                     : 3
 Minor                     : 0
-Backend connection time   : 2021-09-07 02:16:59
-Client connection time    : 2021-09-07 02:16:59
+Backend connection time   : 2021-09-28 04:16:16
+Client connection time    : 2021-09-28 04:16:16
 Client idle duration      : 0
-Client disconnection time : 2021-09-07 02:16:56
+Client disconnection time : 2021-09-28 04:16:33
+Pool Counter              : 1
+Backend PID               : 30796
+Connected                 : 0
+PID                       : 30750
+Backend ID                : 1
+Status                    : Wait for connection
+
+Database                  : test
+Username                  : kawamoto
+Start time                : 2021-09-28 04:16:00
+Client connection count   : 0
+Major                     : 3
+Minor                     : 0
+Backend connection time   : 2021-09-28 04:16:03
+Client connection time    : 2021-09-28 04:16:03
+Client idle duration      : 158 (2:22 before client disconnected)
+Client disconnection time :
+Pool Counter              : 1
+Backend PID               : 30763
+Connected                 : 1
+PID                       : 30751
+Backend ID                : 0
+Status                    : Idle
+
+Database                  : test
+Username                  : kawamoto
+Start time                : 2021-09-28 04:16:00
+Client connection count   : 0
+Major                     : 3
+Minor                     : 0
+Backend connection time   : 2021-09-28 04:16:03
+Client connection time    : 2021-09-28 04:16:03
+Client idle duration      : 158 (2:22 before client disconnected)
+Client disconnection time :
 Pool Counter              : 1
-Backend PID               : 3017
+Backend PID               : 30764
 Connected                 : 1
-PID                       : 2871
+PID                       : 30751
 Backend ID                : 1
 Status                    : Idle
   </programlisting>
index 8ae7e568a7ff08a48a125f6a75e24161d883489c..099564fada6dd25305f3920b37ce3c332cc52443 100644 (file)
        <listitem>
         <para>
          <!--
-         <literal>remaining</literal> is the remaining time by
-         <xref linkend="guc-client-idle-limit">. If
-         <literal>client_idle_limit</literal> is set 0,
-         <literal>remaining</literal> is not desplayed.
+         If <xref linkend="guc-child-life-time"> is set not 0,
+         the time before process restarting is displayed.
          -->
-         <literal>remaining</literal> は <xref linkend="guc-client-idle-limit"> に
-         よる残り時間です。<literal>client_idle_limit</literal> が 0 の場合、
-         <literal>remaining</literal> は表示されません。
+         <xref linkend="guc-child-life-time"> が0でない場合
+         プロセスが再起動されるまでの時間が表示されます。
         </para>
        </listitem>
       </itemizedlist>
       -->
       <literal>client_idle_duration</literal> はクライアントからのコマンドを待機している時間(秒)です。
      </para>
+      <itemizedlist>
+       <listitem>
+        <para>
+        <!--
+          If <xref linkend="guc-client-idle-limit"> is set not 0,
+          the time before client disconnected is displayed.
+        -->
+        <xref linkend="guc-client-idle-limit"> が0でない場合
+        クライアントが切断されるまでの時間が表示されます。
+        </para>
+       </listitem>
+      </itemizedlist>
     </listitem>
 
     <listitem>
    返却行数は常に <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> * 「バックエンドの数」になります。
      ここでは例を示します。
      <programlisting>
-postgres=# show pool_pools;
- pool_pid |              start_time               | client_connection_count | pool_id | backend_id | database | username | backend_connection_time | client_connection_time | client_disconnection_time | client_idle_duration | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected |       status
-----------+---------------------------------------+-------------------------+---------+------------+----------+----------+-------------------------+------------------------+---------------------------+----------------------+--------------+--------------+--------------+-----------------+----------------+---------------------
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 0       | 0          | postgres | postgres | 2021-09-07 02:29:47     | 2021-09-07 02:29:47    | 2021-09-07 02:29:46       | 90                   | 3            | 0            | 1            | 3749            | 1              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 0       | 1          | postgres | postgres | 2021-09-07 02:29:47     | 2021-09-07 02:29:47    | 2021-09-07 02:29:46       | 0                    | 3            | 0            | 1            | 3750            | 1              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 0       | 0          | postgres | postgres | 2021-09-07 02:31:22     | 2021-09-07 02:31:22    | 2021-09-07 02:31:15       | 0                    | 3            | 0            | 1            | 3823            | 1              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 0       | 1          | postgres | postgres | 2021-09-07 02:31:22     | 2021-09-07 02:31:22    | 2021-09-07 02:31:15       | 0                    | 3            | 0            | 1            | 3824            | 1              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
+test=# show pool_pools;
+ pool_pid |     start_time      | client_connection_count | pool_id | backend_id | database | username | backend_connection_time | client_connection_time | client_disconnection_time |         client_idle_duration         | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected |       status
+----------+---------------------+-------------------------+---------+------------+----------+----------+-------------------------+------------------------+---------------------------+--------------------------------------+--------------+--------------+--------------+-----------------+----------------+---------------------
+ 32641    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32643    | 2021-09-28 04:40:45 | 0                       | 0       | 0          | test     | kawamoto | 2021-09-28 04:40:48     | 2021-09-28 04:40:48    |                           | 41 (4:19 before client disconnected) | 3            | 0            | 1            | 32660           | 1              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 0       | 1          | test     | kawamoto | 2021-09-28 04:40:48     | 2021-09-28 04:40:48    |                           | 41 (4:19 before client disconnected) | 3            | 0            | 1            | 32661           | 1              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32644    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32648    | 2021-09-28 04:40:45 | 1                       | 0       | 0          | test     | postgres | 2021-09-28 04:40:52     | 2021-09-28 04:40:52    | 2021-09-28 04:40:59       | 0                                    | 3            | 0            | 1            | 32681           | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 0       | 1          | test     | postgres | 2021-09-28 04:40:52     | 2021-09-28 04:40:52    | 2021-09-28 04:40:59       | 0                                    | 3            | 0            | 1            | 32682           | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 1       | 0          | test     | kawamoto | 2021-09-28 04:41:30     | 2021-09-28 04:41:30    |                           | 0 (5:00 before client disconnected)  | 3            | 0            | 1            | 32746           | 1              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 1       | 1          | test     | kawamoto | 2021-09-28 04:41:30     | 2021-09-28 04:41:30    |                           | 0 (5:00 before client disconnected)  | 3            | 0            | 1            | 32747           | 1              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
 (64 rows)
      </programlisting>
 
index 6c8e360bb4efba845fc550b1bf922ea236c7c8b3..55f055f610fd435072555e8c2c4a61358a00824a 100644 (file)
        <listitem>
         <para>
          <!--
-         <literal>remaining</literal> is the remaining time by
-         <xref linkend="guc-client-idle-limit">. If
-         <literal>client_idle_limit</literal> is set 0,
-         <literal>remaining</literal> is not desplayed.
+         If <xref linkend="guc-child-life-time"> is set not 0,
+         the time before process restarting is displayed.
          -->
-         <literal>remaining</literal> は <xref linkend="guc-client-idle-limit"> に
-         よる残り時間です。<literal>client_idle_limit</literal> が 0 の場合、
-         <literal>remaining</literal> は表示されません。
+         <xref linkend="guc-child-life-time"> が0出ない場合
+         プロセスが再起動されるまでの時間が表示されます。
         </para>
        </listitem>
       </itemizedlist>
    ここでは例を示します。
 
    <programlisting>
-postgres=# show pool_processes;
- pool_pid |              start_time               | client_connection_count | database | username | backend_connection_time | pool_counter |       status
-----------+---------------------------------------+-------------------------+----------+----------+-------------------------+--------------+---------------------
6685     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6686     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6687     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6688     | 2021-09-07 02:41:13 (remaining: 4:10) | 1                       | postgres | postgres | 2021-09-07 02:41:48     | 1            | Idle
6689     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6690     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6691     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6692     | 2021-09-07 02:41:13 (remaining: 5:00) | 2                       | postgres | postgres | 2021-09-07 02:42:38     | 1            | Execute command
+test=# show pool_processes;
+ pool_pid |                      start_time                      | client_connection_count | database | username | backend_connection_time | pool_counter |       status
+----------+------------------------------------------------------+-------------------------+----------+----------+-------------------------+--------------+---------------------
32641    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32642    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
+ 32643    | 2021-09-28 04:40:45                                  | 0                       | test     | kawamoto | 2021-09-28 04:40:48     | 1            | Idle
+ 32644    | 2021-09-28 04:40:45                                  | 0                       | test     | kawamoto | 2021-09-28 04:43:15     | 1            | Execute command
32645    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32646    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32647    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
+ 32648    | 2021-09-28 04:40:45 (3:15 before process restarting) | 2                       |          |          |                         |              | Wait for connection
 (8 rows)
    </programlisting>
   </para>
index 6602d4e7c9bf6f3ba0b043a44450aa0fa422007e..f3eccef132f75de26f104b1144ba6d69734bb04f 100644 (file)
@@ -85,9 +85,14 @@ Pgpool-II documentation
   <para>
    Here is an example output:
    <programlisting>
-$ pcp_proc_info -p 11001 2871
-postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:59 2021-09-07 02:16:59 273 2021-09-07 02:16:56 1 3016 1 2871 0 Idle
-postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:59 2021-09-07 02:16:59 0 2021-09-07 02:16:56 1 3017 1 2871 1 Idle
+$ pcp_proc_info -p 1100
+test postgres 2021-09-28 04:16:00 (4:56 before process restarting) 1 3 0 2021-09-28 04:16:16 2021-09-28 04:16:16 0 2021-09-28 04:16:33 1 30795 0 30750 0 Wait for connection
+test postgres 2021-09-28 04:16:00 (4:56 before process restarting) 1 3 0 2021-09-28 04:16:16 2021-09-28 04:16:16 0 2021-09-28 04:16:33 1 30796 0 30750 1 Wait for connection
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 34 (4:26 before client disconnected)  1 30763 1 30751 0 Idle
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 34 (4:26 before client disconnected)  1 30764 1 30751 1 Idle
+$ pcp_proc_info -p 11001 30751
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 58 (4:02 before client disconnected)  1 30763 1 30751 0 Idle
+test kawamoto 2021-09-28 04:16:00 0 3 0 2021-09-28 04:16:03 2021-09-28 04:16:03 58 (4:02 before client disconnected)  1 30764 1 30751 1 Idle
    </programlisting>
   </para>
   <para>
@@ -95,13 +100,13 @@ postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:5
    <literallayout class="monospaced">
     1. connected database name
     2. connected user name
-    3. process start-up timestamp (remaining time by <xref linkend="guc-client-idle-limit">. If client_idle_limit is set 0, remaining is not desplayed.)
+    3. process start-up timestamp (If <xref linkend="guc-child-life-time"> is set not 0, the time before process restarting is displayed.)
     4. process-reuse counter for <xref linkend="guc-child-max-connections">
     5. protocol major version
     6. protocol minor version
     7. connection created timestamp
     8. last client connected timestamp
-    9. client idle duration (sec) for <xref linkend="guc-client-idle-limit">
+    9. client idle duration (sec) (If <xref linkend="guc-client-idle-limit"> is set not 0, the time before client disconnected is displayed.)
     10. last client disconnected timestamp
     11. connection-reuse counter
     12. PostgreSQL backend process id
@@ -121,38 +126,72 @@ postgres postgres 2021-09-07 02:12:53 (remaining: 0:27) 1 3 0 2021-09-07 02:16:5
    The <option>--verbose</option> option can help understand the output. For example:
   </para>
   <programlisting>
-$ pcp_proc_info -p 11001 --verbose 2871
-Database                  : postgres
+$ pcp_proc_info -p 11001 --verbose
+Database                  : test
 Username                  : postgres
-Start time                : 2021-09-07 02:12:53 (remaining: 3:36)
+Start time                : 2021-09-28 04:16:00 (2:52 before process restarting)
 Client connection count   : 1
 Major                     : 3
 Minor                     : 0
-Backend connection time   : 2021-09-07 02:16:59
-Client connection time    : 2021-09-07 02:16:59
-Client idle duration      : 84
-Client disconnection time : 2021-09-07 02:16:56
+Backend connection time   : 2021-09-28 04:16:16
+Client connection time    : 2021-09-28 04:16:16
+Client idle duration      : 0
+Client disconnection time : 2021-09-28 04:16:33
 Pool Counter              : 1
-Backend PID               : 3016
-Connected                 : 1
-PID                       : 2871
+Backend PID               : 30795
+Connected                 : 0
+PID                       : 30750
 Backend ID                : 0
-Status                    : Idle
+Status                    : Wait for connection
 
-Database                  : postgres
+Database                  : test
 Username                  : postgres
-Start time                : 2021-09-07 02:12:53 (remaining: 3:36)
+Start time                : 2021-09-28 04:16:00 (2:52 before process restarting)
 Client connection count   : 1
 Major                     : 3
 Minor                     : 0
-Backend connection time   : 2021-09-07 02:16:59
-Client connection time    : 2021-09-07 02:16:59
+Backend connection time   : 2021-09-28 04:16:16
+Client connection time    : 2021-09-28 04:16:16
 Client idle duration      : 0
-Client disconnection time : 2021-09-07 02:16:56
+Client disconnection time : 2021-09-28 04:16:33
+Pool Counter              : 1
+Backend PID               : 30796
+Connected                 : 0
+PID                       : 30750
+Backend ID                : 1
+Status                    : Wait for connection
+
+Database                  : test
+Username                  : kawamoto
+Start time                : 2021-09-28 04:16:00
+Client connection count   : 0
+Major                     : 3
+Minor                     : 0
+Backend connection time   : 2021-09-28 04:16:03
+Client connection time    : 2021-09-28 04:16:03
+Client idle duration      : 158 (2:22 before client disconnected)
+Client disconnection time :
+Pool Counter              : 1
+Backend PID               : 30763
+Connected                 : 1
+PID                       : 30751
+Backend ID                : 0
+Status                    : Idle
+
+Database                  : test
+Username                  : kawamoto
+Start time                : 2021-09-28 04:16:00
+Client connection count   : 0
+Major                     : 3
+Minor                     : 0
+Backend connection time   : 2021-09-28 04:16:03
+Client connection time    : 2021-09-28 04:16:03
+Client idle duration      : 158 (2:22 before client disconnected)
+Client disconnection time :
 Pool Counter              : 1
-Backend PID               : 3017
+Backend PID               : 30764
 Connected                 : 1
-PID                       : 2871
+PID                       : 30751
 Backend ID                : 1
 Status                    : Idle
   </programlisting>
index 5ece2ee5466b61fbbc17250baa6ffccb52656acb..a0605224ee8f251bceb64fb0c1ab19981a8a6148 100644 (file)
       <itemizedlist>
        <listitem>
         <para>
-         <literal>remaining</literal> is the remaining time by
-         <xref linkend="guc-client-idle-limit">. If
-         <literal>client_idle_limit</literal> is set 0,
-         <literal>remaining</literal> is not desplayed.
+         If <xref linkend="guc-child-life-time"> is set not 0,
+         the time before process restarting is displayed.
         </para>
        </listitem>
       </itemizedlist>
      <para>
       <literal>client_idle_duration</literal> is the time (sec) that a client
       is in idle.
+      <itemizedlist>
+       <listitem>
+        <para>
+         If <xref linkend="guc-client-idle-limit"> is set not 0,
+         the time before client disconnected is displayed.
+        </para>
+       </listitem>
+      </itemizedlist>
      </para>
     </listitem>
 
    It'll always return <xref linkend="guc-num-init-children"> * <xref linkend="guc-max-pool"> *
      number_of_backends lines.  Here is an example session:
      <programlisting>
-postgres=# show pool_pools;
- pool_pid |              start_time               | client_connection_count | pool_id | backend_id | database | username | backend_connection_time | client_connection_time | client_disconnection_time | client_idle_duration | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected |       status
-----------+---------------------------------------+-------------------------+---------+------------+----------+----------+-------------------------+------------------------+---------------------------+----------------------+--------------+--------------+--------------+-----------------+----------------+---------------------
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3727     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3728     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 0       | 0          | postgres | postgres | 2021-09-07 02:29:47     | 2021-09-07 02:29:47    | 2021-09-07 02:29:46       | 90                   | 3            | 0            | 1            | 3749            | 1              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 0       | 1          | postgres | postgres | 2021-09-07 02:29:47     | 2021-09-07 02:29:47    | 2021-09-07 02:29:46       | 0                    | 3            | 0            | 1            | 3750            | 1              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3729     | 2021-09-07 02:29:38 (remaining: 3:30) | 1                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Idle
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3730     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3731     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3732     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3733     | 2021-09-07 02:29:38 (remaining: 5:00) | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 0       | 0          | postgres | postgres | 2021-09-07 02:31:22     | 2021-09-07 02:31:22    | 2021-09-07 02:31:15       | 0                    | 3            | 0            | 1            | 3823            | 1              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 0       | 1          | postgres | postgres | 2021-09-07 02:31:22     | 2021-09-07 02:31:22    | 2021-09-07 02:31:15       | 0                    | 3            | 0            | 1            | 3824            | 1              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 1       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 1       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 2       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 2       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 3       | 0          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
- 3734     | 2021-09-07 02:29:38 (remaining: 5:00) | 4                       | 3       | 1          |          |          |                         |                        |                           | 0                    | 0            | 0            | 0            | 0               | 0              | Execute command
+test=# show pool_pools;
+ pool_pid |     start_time      | client_connection_count | pool_id | backend_id | database | username | backend_connection_time | client_connection_time | client_disconnection_time |         client_idle_duration         | majorversion | minorversion | pool_counter | pool_backendpid | pool_connected |       status
+----------+---------------------+-------------------------+---------+------------+----------+----------+-------------------------+------------------------+---------------------------+--------------------------------------+--------------+--------------+--------------+-----------------+----------------+---------------------
+ 32641    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32641    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32642    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32643    | 2021-09-28 04:40:45 | 0                       | 0       | 0          | test     | kawamoto | 2021-09-28 04:40:48     | 2021-09-28 04:40:48    |                           | 41 (4:19 before client disconnected) | 3            | 0            | 1            | 32660           | 1              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 0       | 1          | test     | kawamoto | 2021-09-28 04:40:48     | 2021-09-28 04:40:48    |                           | 41 (4:19 before client disconnected) | 3            | 0            | 1            | 32661           | 1              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32643    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Idle
+ 32644    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32644    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32645    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32646    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 0       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 0       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 1       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 1       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32647    | 2021-09-28 04:40:45 | 0                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Wait for connection
+ 32648    | 2021-09-28 04:40:45 | 1                       | 0       | 0          | test     | postgres | 2021-09-28 04:40:52     | 2021-09-28 04:40:52    | 2021-09-28 04:40:59       | 0                                    | 3            | 0            | 1            | 32681           | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 0       | 1          | test     | postgres | 2021-09-28 04:40:52     | 2021-09-28 04:40:52    | 2021-09-28 04:40:59       | 0                                    | 3            | 0            | 1            | 32682           | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 1       | 0          | test     | kawamoto | 2021-09-28 04:41:30     | 2021-09-28 04:41:30    |                           | 0 (5:00 before client disconnected)  | 3            | 0            | 1            | 32746           | 1              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 1       | 1          | test     | kawamoto | 2021-09-28 04:41:30     | 2021-09-28 04:41:30    |                           | 0 (5:00 before client disconnected)  | 3            | 0            | 1            | 32747           | 1              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 2       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 2       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 3       | 0          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
+ 32648    | 2021-09-28 04:40:45 | 1                       | 3       | 1          |          |          |                         |                        |                           | 0                                    | 0            | 0            | 0            | 0               | 0              | Execute command
 (64 rows)
      </programlisting>
 
index 303673703526df68d1be05fc0d34c80e3ee61f18..cb33f0cb0a3b2962592cda520c415830fcd9e2ab 100644 (file)
       <itemizedlist>
        <listitem>
         <para>
-         <literal>remaining</literal> is the remaining time by
-         <xref linkend="guc-client-idle-limit">. If
-         <literal>client_idle_limit</literal> is set 0,
-         <literal>remaining</literal> is not desplayed.
+         If <xref linkend="guc-child-life-time"> is set not 0,
+         the time before process restarting is displayed.
         </para>
        </listitem>
       </itemizedlist>
   <para>
    Here is an example session:
    <programlisting>
-postgres=# show pool_processes;
- pool_pid |              start_time               | client_connection_count | database | username | backend_connection_time | pool_counter |       status
-----------+---------------------------------------+-------------------------+----------+----------+-------------------------+--------------+---------------------
6685     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6686     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6687     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6688     | 2021-09-07 02:41:13 (remaining: 4:10) | 1                       | postgres | postgres | 2021-09-07 02:41:48     | 1            | Idle
6689     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6690     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
6691     | 2021-09-07 02:41:13 (remaining: 5:00) | 0                       |          |          |                         |              | Wait for connection
- 6692     | 2021-09-07 02:41:13 (remaining: 5:00) | 2                       | postgres | postgres | 2021-09-07 02:42:38     | 1            | Execute command
+test=# show pool_processes;
+ pool_pid |                      start_time                      | client_connection_count | database | username | backend_connection_time | pool_counter |       status
+----------+------------------------------------------------------+-------------------------+----------+----------+-------------------------+--------------+---------------------
32641    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32642    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
+ 32643    | 2021-09-28 04:40:45                                  | 0                       | test     | kawamoto | 2021-09-28 04:40:48     | 1            | Idle
+ 32644    | 2021-09-28 04:40:45                                  | 0                       | test     | kawamoto | 2021-09-28 04:43:15     | 1            | Execute command
32645    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32646    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
32647    | 2021-09-28 04:40:45                                  | 0                       |          |          |                         |              | Wait for connection
+ 32648    | 2021-09-28 04:40:45 (3:15 before process restarting) | 2                       |          |          |                         |              | Wait for connection
 (8 rows)
    </programlisting>
   </para>
index acf94076e3b048dd59d109b387a147d911e509c5..bc523d49e7d19ace190b14b81baf085bc27eb790 100644 (file)
@@ -169,6 +169,8 @@ typedef struct
 {
        pid_t           pid;                    /* OS's process id */
        time_t          start_time;             /* fork() time */
+       char            connected;              /* if not 0 this process is already used*/
+       int                     wait_for_connect;       /* waiting time for client connection (s) */
        ConnectionInfo *connection_info;        /* head of the connection info for
                                                                                 * this process */
        int                     client_connection_count;        /* how many times clients used this process */
@@ -248,7 +250,7 @@ typedef struct
        char            backend_connection_time[POOLCONFIG_MAXDATELEN + 1];
        char            client_connection_time[POOLCONFIG_MAXDATELEN + 1];
        char            client_disconnection_time[POOLCONFIG_MAXDATELEN + 1];
-       char            client_idle_duration[POOLCONFIG_MAXCOUNTLEN + 1];
+       char            client_idle_duration[POOLCONFIG_MAXDATELEN + 1];
        char            pool_majorversion[POOLCONFIG_MAXCOUNTLEN + 1];
        char            pool_minorversion[POOLCONFIG_MAXCOUNTLEN + 1];
        char            pool_counter[POOLCONFIG_MAXCOUNTLEN + 1];
index fda8e6dbf18b45f486f70fe7e803ef044c674e35..eb1df00aeaa5c963255c97c3a178d536909b2211 100644 (file)
@@ -411,6 +411,8 @@ PgpoolMain(bool discard_status, bool clear_memcache_oidmaps)
                process_info[i].start_time = time(NULL);
                process_info[i].client_connection_count = 0;
                process_info[i].status = WAIT_FOR_CONNECT;
+               process_info[i].connected = 0;
+               process_info[i].wait_for_connect = 0;
        }
 
        /* create pipe for delivering event */
@@ -2026,6 +2028,8 @@ failover(void)
                                                process_info[i].start_time = time(NULL);
                                                process_info[i].client_connection_count = 0;
                                                process_info[i].status = WAIT_FOR_CONNECT;
+                                               process_info[i].connected = 0;
+                                               process_info[i].wait_for_connect = 0;
                                        }
                                }
                                else
@@ -2495,6 +2499,8 @@ reaper(void)
                                                new_pid = process_info[i].pid;
                                                process_info[i].client_connection_count = 0;
                                                process_info[i].status = WAIT_FOR_CONNECT;
+                                               process_info[i].connected = 0;
+                                               process_info[i].wait_for_connect = 0;
                                        }
                                        else
                                                process_info[i].pid = 0;
@@ -4260,6 +4266,8 @@ sync_backend_from_watchdog(void)
                                        process_info[i].start_time = time(NULL);
                                        process_info[i].client_connection_count = 0;
                                        process_info[i].status = WAIT_FOR_CONNECT;
+                                       process_info[i].connected = 0;
+                                       process_info[i].wait_for_connect = 0;
                                }
                        }
                        else
index 427c809a28c5670c7bee729bd349a4a56166b16a..c4a432ee7c3ed5dbb30b2ecbccdc806f3fa28fea 100644 (file)
@@ -84,7 +84,7 @@ static bool connect_using_existing_connection(POOL_CONNECTION * frontend,
 static void check_restart_request(void);
 static void enable_authentication_timeout(void);
 static void disable_authentication_timeout(void);
-static int     wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr);
+static int     wait_for_new_connections(int *fds, SockAddr *saddr);
 static void check_config_reload(void);
 static void get_backends_status(unsigned int *valid_backends, unsigned int *down_backends);
 static void validate_backend_connectivity(int front_end_fd);
@@ -147,9 +147,6 @@ do_child(int *fds)
        POOL_CONNECTION_POOL *volatile backend = NULL;
        struct timeval now;
        struct timezone tz;
-       struct timeval timeout;
-       static int      connected = 0;  /* non 0 if has been accepted connections from
-                                                                * frontend */
 
        /* counter for child_max_connections.  "volatile" declaration is necessary
         * so that this is counted up even if long jump is issued due to
@@ -311,9 +308,6 @@ do_child(int *fds)
        /* We can now handle ereport(ERROR) */
        PG_exception_stack = &local_sigjmp_buf;
 
-       timeout.tv_sec = pool_config->child_life_time;
-       timeout.tv_usec = 0;
-
        for (;;)
        {
                StartupPacket *sp;
@@ -335,10 +329,11 @@ do_child(int *fds)
                /* Destroy session context for just in case... */
                pool_session_context_destroy();
 
-               front_end_fd = wait_for_new_connections(fds, &timeout, &saddr);
+               front_end_fd = wait_for_new_connections(fds, &saddr);
+               proc_info->wait_for_connect = 0;
                if (front_end_fd == OPERATION_TIMEOUT)
                {
-                       if (pool_config->child_life_time > 0 && connected)
+                       if (pool_config->child_life_time > 0 && proc_info->connected)
                        {
                                ereport(DEBUG1,
                                                (errmsg("child life %d seconds expired", pool_config->child_life_time)));
@@ -405,7 +400,7 @@ do_child(int *fds)
                        child_frontend = NULL;
                        continue;
                }
-               connected = 1;
+               proc_info->connected = 1;
 
                /*
                 * show ps status
@@ -466,9 +461,6 @@ do_child(int *fds)
                if (pool_config->log_disconnections)
                        log_disconnections(sp->database, sp->user);
 
-               timeout.tv_sec = pool_config->child_life_time;
-               timeout.tv_usec = 0;
-
                /* increment queries counter if necessary */
                if (pool_config->child_max_connections > 0)
                        connections_count++;
@@ -1457,7 +1449,7 @@ check_restart_request(void)
  */
 
 static int
-wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
+wait_for_new_connections(int *fds, SockAddr *saddr)
 {
        fd_set          rmask;
        int                     numfds;
@@ -1475,10 +1467,10 @@ wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
        static int      cnt;
 #endif
 
-       struct timeval *timeoutval;
-       struct timeval tv1,
-                               tv2,
-                               tmback = {0, 0};
+       struct timeval *timeout;
+       struct timeval timeoutdata;
+
+       ProcessInfo* proc_info = pool_get_process_info(getpid());
 
        for (walk = fds; *walk != -1; walk++)
                socket_set_nonblock(*walk);
@@ -1490,25 +1482,6 @@ wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
 
        set_process_status(WAIT_FOR_CONNECT);
 
-       memcpy((char *) &rmask, (char *) &readmask, sizeof(fd_set));
-
-       if (timeout->tv_sec == 0 && timeout->tv_usec == 0)
-               timeoutval = NULL;
-       else
-       {
-               timeoutval = timeout;
-               tmback.tv_sec = timeout->tv_sec;
-               tmback.tv_usec = timeout->tv_usec;
-               gettimeofday(&tv1, NULL);
-
-#ifdef DEBUG
-               ereport(DEBUG3,
-                               (errmsg("before select = {%d, %d}", timeoutval->tv_sec, timeoutval->tv_usec)));
-               ereport(DEBUG3,
-                               (errmsg("g:before select = {%d, %d}", tv1.tv_sec, tv1.tv_usec)));
-#endif
-       }
-
        /*
         * If child life time is disabled and serialize_accept is on, we serialize
         * select() and accept() to avoid the "Thundering herd" problem.
@@ -1560,12 +1533,45 @@ wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
                }
 
                set_ps_display("wait for connection request", false);
-               set_process_status(WAIT_FOR_CONNECT);
                ereport(DEBUG1,
                                (errmsg("LOCKING select()")));
        }
 
-       numfds = select(nsocks, &rmask, NULL, NULL, timeoutval);
+       for (;;)
+       {
+               /* check backend timer is expired */
+               if (backend_timer_expired)
+               {
+                       pool_backend_timer();
+                       backend_timer_expired = 0;
+               }
+
+               /* prepare select */
+               memcpy((char *) &rmask, (char *) &readmask, sizeof(fd_set));
+               if (pool_config->child_life_time > 0)
+               {
+                       timeoutdata.tv_sec = 1;
+                       timeoutdata.tv_usec = 0;
+                       timeout = &timeoutdata;
+               }
+               else
+               {
+                       timeout = NULL;
+               }
+
+               numfds = select(nsocks, &rmask, NULL, NULL, timeout);
+
+               /* not timeout*/
+               if (numfds != 0)
+                       break;
+
+               /* timeout */
+               proc_info->wait_for_connect++;
+
+               if (proc_info->wait_for_connect > pool_config->child_life_time)
+                       return OPERATION_TIMEOUT;
+
+       }
 
        save_errno = errno;
 
@@ -1583,40 +1589,6 @@ wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
                backend_timer_expired = 0;
        }
 
-       /*
-        * following code fragment computes remaining timeout val in a portable
-        * way. Linux does this automatically but other platforms do not.
-        */
-       if (timeoutval)
-       {
-               gettimeofday(&tv2, NULL);
-
-               tmback.tv_usec -= tv2.tv_usec - tv1.tv_usec;
-               tmback.tv_sec -= tv2.tv_sec - tv1.tv_sec;
-
-               if (tmback.tv_usec < 0)
-               {
-                       tmback.tv_sec--;
-                       if (tmback.tv_sec < 0)
-                       {
-                               timeout->tv_sec = 0;
-                               timeout->tv_usec = 0;
-                       }
-                       else
-                       {
-                               tmback.tv_usec += 1000000;
-                               timeout->tv_sec = tmback.tv_sec;
-                               timeout->tv_usec = tmback.tv_usec;
-                       }
-               }
-#ifdef DEBUG
-               ereport(DEBUG3,
-                               (errmsg("g:after select = {%d, %d}", tv2.tv_sec, tv2.tv_usec)));
-               ereport(DEBUG3,
-                               (errmsg("after select = {%d, %d}", timeout->tv_sec, timeout->tv_usec)));
-#endif
-       }
-
        errno = save_errno;
 
        if (numfds == -1)
@@ -1628,12 +1600,6 @@ wait_for_new_connections(int *fds, struct timeval *timeout, SockAddr *saddr)
                                 errdetail("select on socket failed with error : \"%m\"")));
        }
 
-       /* timeout */
-       if (numfds == 0)
-       {
-               return OPERATION_TIMEOUT;
-       }
-
        for (walk = fds; *walk != -1; walk++)
        {
                if (FD_ISSET(*walk, &rmask))
index 33a8544e7b4241a4d6c7ac58eb138e2ef97d6817..c1df7683fd2e9fe45d3e13f359a1c95c0ed2fc13 100644 (file)
@@ -1424,22 +1424,27 @@ get_pools(int *nrows)
                proc_id = process_info[child].pid;
                pi = pool_get_process_info(proc_id);
 
-               int remaining_time = pool_config->client_idle_limit;
-               if (pool_config->client_idle_limit)
+               int exist_live_connection = 0;
+               for (pool = 0; pool < pool_config->max_pool; pool++)
                {
-                       for (pool = 0; pool < pool_config->max_pool; pool++)
+                       poolBE = pool * MAX_NUM_BACKENDS;
+                       if (pi->connection_info[poolBE].connected)
                        {
-                               for (backend_id = 0; backend_id < NUM_BACKENDS; backend_id++)
-                               {
-                                       poolBE = pool * MAX_NUM_BACKENDS + backend_id;
-                                       if (pi->connection_info[poolBE].client_idle_duration > 0)
-                                               remaining_time = pool_config->client_idle_limit - pi->connection_info[poolBE].client_idle_duration;
-                               }
+                               exist_live_connection = 1;
+                               break;
                        }
                }
 
+
                for (pool = 0; pool < pool_config->max_pool; pool++)
                {
+                       int idle_duration = pi->connection_info[pool * MAX_NUM_BACKENDS].client_idle_duration;
+                       int cliet_idle_time = pool_config->client_idle_limit;
+                       if (pool_config->client_idle_limit > 0)
+                       {
+                               cliet_idle_time = pool_config->client_idle_limit - idle_duration;
+                       }
+
                        for (backend_id = 0; backend_id < NUM_BACKENDS; backend_id++)
                        {
                                poolBE = pool * MAX_NUM_BACKENDS + backend_id;
@@ -1447,15 +1452,19 @@ get_pools(int *nrows)
 
                                if (pi->start_time)
                                {
-                                       if (pool_config->client_idle_limit)
+                                       if ((pool_config->child_life_time > 0)
+                                               && (pi->connected)
+                                               && (!exist_live_connection))
                                        {
                                                char proc_start_time[POOLCONFIG_MAXDATELEN + 1];
+                                               int wait_for_connect_time = pool_config->child_life_time - pi->wait_for_connect;
+
                                                strftime(proc_start_time, sizeof(proc_start_time),
                                                                 "%Y-%m-%d %H:%M:%S", localtime(&pi->start_time));
                                                snprintf(pools[lines].process_start_time, sizeof(pools[lines].process_start_time),
-                                                                "%s (remaining: %d:%02d)", proc_start_time,
-                                                                remaining_time / 60,
-                                                                remaining_time % 60);
+                                                                "%s (%d:%02d before process restarting)", proc_start_time,
+                                                                wait_for_connect_time / 60,
+                                                                wait_for_connect_time % 60);
                                        }
                                        else
                                        {
@@ -1473,7 +1482,8 @@ get_pools(int *nrows)
                                snprintf(pools[lines].client_connection_count, sizeof(pools[lines].client_connection_count),
                                                 "%d", pi->client_connection_count);
 
-                               if (pi->connection_info[poolBE].client_connection_time == 0){
+                               if (pi->connection_info[poolBE].client_connection_time == 0)
+                               {
                                        *(pools[lines].client_connection_time) = '\0';
                                }
                                else
@@ -1482,7 +1492,8 @@ get_pools(int *nrows)
                                                 "%Y-%m-%d %H:%M:%S", localtime(&pi->connection_info[poolBE].client_connection_time));
                                }
 
-                               if (pi->connection_info[poolBE].client_disconnection_time == 0){
+                               if (pi->connection_info[poolBE].client_disconnection_time == 0)
+                               {
                                        *(pools[lines].client_disconnection_time) = '\0';
                                }
                                else
@@ -1491,8 +1502,17 @@ get_pools(int *nrows)
                                                 "%Y-%m-%d %H:%M:%S", localtime(&pi->connection_info[poolBE].client_disconnection_time));
                                }
 
-                               snprintf(pools[lines].client_idle_duration, sizeof(pools[lines].client_idle_duration), "%d",
-                                                pi->connection_info[poolBE].client_idle_duration);
+                               if ((pool_config->client_idle_limit > 0)
+                                       && (pi->connection_info[poolBE].connected))
+                               {
+                                       snprintf(pools[lines].client_idle_duration, sizeof(pools[lines].client_idle_duration),
+                                                        "%d (%d:%02d before client disconnected)", idle_duration,
+                                                        cliet_idle_time / 60,
+                                                        cliet_idle_time % 60);
+                               }
+                               else
+                                       snprintf(pools[lines].client_idle_duration, sizeof(pools[lines].client_idle_duration),
+                                                        "%d", idle_duration);
 
                                if (strlen(pi->connection_info[poolBE].database) == 0)
                                {
@@ -1589,31 +1609,31 @@ get_processes(int *nrows)
                proc_id = process_info[child].pid;
                pi = pool_get_process_info(proc_id);
 
-               int remaining_time = pool_config->client_idle_limit;
-               if (pool_config->client_idle_limit)
+               int exist_live_connection = 0;
+               for (pool = 0; pool < pool_config->max_pool; pool++)
                {
-                       int backend_id;
-                       for (pool = 0; pool < pool_config->max_pool; pool++)
+                       poolBE = pool * MAX_NUM_BACKENDS;
+                       if (pi->connection_info[poolBE].connected)
                        {
-                               for (backend_id = 0; backend_id < NUM_BACKENDS; backend_id++)
-                               {
-                                       poolBE = pool * MAX_NUM_BACKENDS + backend_id;
-                                       if (pi->connection_info[poolBE].client_idle_duration > 0)
-                                               remaining_time = pool_config->client_idle_limit - pi->connection_info[poolBE].client_idle_duration;
-                               }
+                               exist_live_connection = 1;
+                               break;
                        }
                }
 
                snprintf(processes[child].pool_pid, POOLCONFIG_MAXCOUNTLEN, "%d", proc_id);
-               if (pool_config->client_idle_limit)
+               if ((pool_config->child_life_time > 0)
+                       && (pi->connected)
+                       && (!exist_live_connection))
                {
                        char proc_start_time[POOLCONFIG_MAXDATELEN + 1];
+                       int wait_for_connect_time = pool_config->child_life_time - pi->wait_for_connect;
+
                        strftime(proc_start_time, sizeof(proc_start_time),
                                         "%Y-%m-%d %H:%M:%S", localtime(&pi->start_time));
                        snprintf(processes[child].process_start_time, sizeof(processes[child].process_start_time),
-                                        "%s (remaining: %d:%02d)", proc_start_time,
-                                        remaining_time / 60,
-                                        remaining_time % 60);
+                                        "%s (%d:%02d before process restarting)", proc_start_time,
+                                        wait_for_connect_time / 60,
+                                        wait_for_connect_time % 60);
                }
                else
                {