Doc: enhance the description on connection_life_time
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 24 Apr 2025 10:11:43 +0000 (19:11 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 24 Apr 2025 10:11:43 +0000 (19:11 +0900)
connection_life_time is a config value to determine the life time of
cached connections to PostgreSQL backend. Current document lacks a
description that the expiration calculation is actually done at the
time when the client disconnects to the process which holds the cached
connections.

Discussion: [pgpool-hackers: 4577] Doc: enhance the description on connection_life_time
https://www.pgpool.net/pipermail/pgpool-hackers/2025-April/004578.html
Backpatch-through: v4.2

doc.ja/src/sgml/connection-pooling.sgml
doc/src/sgml/connection-pooling.sgml

index 3335e85aec9bd55b2e3390986a7980305ae8d5d4..7f50d56791f6804086970064eb460a692ef3fe9b 100644 (file)
@@ -444,6 +444,11 @@ pgbench -n -S -p 9999 -c 32 -C -S -T 300 test
       ใ‚ญใƒฃใƒƒใ‚ทใƒฅใ•ใ‚ŒใŸ<productname>PostgreSQL</>ใธใฎๆŽฅ็ถšใ‚’ๅˆ‡ๆ–ญใ™ใ‚‹ใพใงใฎๆ™‚้–“ใ‚’็ง’ๅ˜ไฝใงๆŒ‡ๅฎšใ—ใพใ™ใ€‚
       ใ“ใ‚Œใฏใ‚ญใƒฃใƒƒใ‚ทใƒฅใ•ใ‚ŒใŸๆŽฅ็ถšใฎๆœ‰ๅŠนๆœŸ้–“ใจใ—ใฆๅƒใใพใ™ใ€‚
      </para>
+     <para>
+      ใ“ใฎใ‚ญใƒฃใƒƒใ‚ทใƒฅใ‚’ไฟๆŒใ™ใ‚‹ใƒ—ใƒญใ‚ปใ‚นใซๆŽฅ็ถšไธญใฎใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใŒใ‚ใ‚‹ๅ ดๅˆใฏใ€ใใฎๆŽฅ็ถšใŒ็ต‚ไบ†ใ™ใ‚‹ใพใง<varname>connection_life_time</varname>ใฎๆœ‰ๅŠนๆœŸ้–“ใŒๆฅใŸใ‹ใฉใ†ใ‹ใฎ่จˆ็ฎ—ใฏ่กŒใ‚ใ‚Œใพใ›ใ‚“ใ€‚
+      ใ—ใŸใŒใฃใฆใ€ใ“ใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟใฎ่จญๅฎšๅ€คใ‚ˆใ‚Šใ‚‚้•ทๆ™‚้–“ใ‚ญใƒฃใƒƒใ‚ทใƒฅใ•ใ‚ŒใŸใ‚ณใƒใ‚ฏใ‚ทใƒงใƒณใŒไฟๆŒใ•ใ‚Œใ‚‹ใ“ใจใŒใ‚ใ‚Šๅพ—ใพใ™ใ€‚
+      ใ“ใ‚Œใ‚’้ฟใ‘ใŸใ„ๅ ดๅˆใฏใ€<xref linkend="guc-client-idle-limit">ใ‚’็Ÿญใ‚ใซ่จญๅฎšใ™ใ‚‹ใ“ใจใ‚’ใŠๅ‹งใ‚ใ—ใพใ™ใ€‚
+     </para>
      <para>
       <!--
       The default is 0, which means the cached connections will not be disconnected.
index daa84c3f73e4a8ec71fc636218829c3c960d1aae..3301bd4a9f0a65f849bec28f605fbdd0a46c396e 100644 (file)
     <listitem>
      <para>
       Specifies the time in seconds to terminate the cached connections
-      to the PostgreSQL backend. This serves as the cached connection expiration time.
+      to the <productname>PostgreSQL</> backend. This serves as the cached connection expiration time.
      </para>
      <para>
-      The default is 0, which means the cached connections will not be disconnected.
+      If a client connects to the process which holds the cached
+      connections, a calculation on
+      the <varname>connection_life_time</varname> is not performed
+      until the client disconnects. Thus it is possible that the cached
+      connections are kept for longer time than this value. To avoid
+      this, it is recommended to set shorter value
+      to <xref linkend="guc-client-idle-limit">.
+     </para>
+     <para>
+      The default is 0, which means the cached connections will not be
+      disconnected.
      </para>
      <para>
       This parameter can only be set at server start.