<!-- doc/src/sgml/release-4.4.sgml -->
<!-- See header comment in release.sgml about typical markup -->

<sect1 id="release-4-4-16">
 <title>Release 4.4.16</title>
 <note>
  <title>Release Date</title>
  <simpara>2026-02-26</simpara>
 </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2026-01-29 [118f61932]
    -->
    <para>
     Allow parallel <command>make</command>. (Tatsuo Ishii)
    </para>
    <para>
     Previously a parallel <command>make</command> failed with:
     <programlisting>
In file included from parser.c:27:
../../src/include/parser/gramparse.h:33:10: fatal error: gram.h: No such file or directory
33 | #include "gram.h"
     </programlisting>
    </para>
    <para>
     Patch is created by anthonyroussel and reviewed by Tatsuo Ishii.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/pull/146">Fix parallel build</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2026-01-26 [d638018ce]
    -->
    <para>
     Add detail log about mismatch between <xref linkend="guc-backend-hostname"> and <varname>primary_conninfo</varname> host. (Taiki Koshino)
    </para>
    <para>
     If the <xref linkend="guc-backend-hostname"> set in <filename>pgpool.conf</filename> does not match
     the host setting in <productname>PostgreSQL</productname>'s <varname>primary_conninfo</varname>,
     the following log message will be output.
     <programlisting>
sr_check_worker pid 25099: DETAIL: pgpool.conf backend_hostname: "pgpool0" does not match PostgreSQL primary_conninfo host: "pgpool_logtest"
     </programlisting>
    </para>
   </listitem>
   <listitem>
    <!--
    2025-12-24 [ef33aca38]
    -->
    <para>
     Explicitly stat supported minimum OpenSSL version. (Tatsuo Ishii)
    </para>
    <para>
     That can be done in configure.ac by using
     <programlisting>
AC_DEFINE(OPENSSL_API_COMPAT, [0x10002000L],
          [Define to the OpenSSL API version in use. This avoids deprecation warnings from newer OpenSSL versions.])
     </programlisting>

     The supported minimum version is 1.0.2, which is identical to
     <productname>PostgreSQL</productname> at this point.  (Actually the AC_DEFINE is brought in from
     <productname>PostgreSQL</productname>).  Also this could avoid OpenSSL deprecation warnings if
     your installed OpenSSL is new, like 3.0.
     Moreover, add mention to installation document that required minimum
     version of OpenSSL is 1.0.2.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2026-01-31 [55ee45801]
    -->
    <para>
     Fix oversight in <function>check_transaction_state_and_abort()</function>. (Tatsuo Ishii)
    </para>
    <para>
     The function does not take the case when frontend is NULL into account.
    </para>
    <para>
     Problem pointed out by Coverity.
    </para>
   </listitem>

   <listitem>
    <!--
    2026-01-22 [c0f2cb883]
    -->
    <para>
     Fix <function>walker()</function> functions to return earlier. (Tatsuo Ishii)
    </para>
    <para>
     Previously <function>walker()</function> functions returned false once it found target
     objects.  But it is possible to short-circuit the traverse and it
     should have been.

     Also import comments from <productname>PostgreSQL</productname> to clarify walker function
     design.
    </para>
    <para>
     Problem reported by liujinyang-highgo and reviewed by Tatsuo Ishii.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/143">Improper handling in the function view_walker().</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2026-01-09 [7b00d24de]
    -->
    <para>
     Fix memory leak in <literal>scram-sha-256</literal> authentication. (Tatsuo Ishii)
    </para>
    <para>
     Problem pointed out by Coverity.
    </para>
   </listitem>

   <listitem>
    <!--
    2026-01-07 [81e8d3ec6]
    -->
    <para>
     Fix to check the return value of <function>malloc()</function>. (Tatsuo Ishii)
    </para>
    <para>
     <function>create_inet_domain_sockets()</function> forgot to check the return value of
     <function>malloc()</function> while allocating memory for socket fds.
    </para>
   </listitem>

   <listitem>
    <!--
    2026-01-06 [2218b5e56]
    -->
    <para>
     Fix health check process to not start. (Tatsuo Ishii)
    </para>
    <para>
     Previously <function>pgpool_main()</function> did not start a health check process if the
     backend node is down.  This prevented auto_failback from working.
     Pgpool reads status from <varname>pool_status</varname> file when <option>-D</option> option is not
     present.  If the status recorded in the file is "down", pgpool will
     not start health check process for the node.  Since auto_failback is
     invoked from health check process, this means that auto_failback does
     not work for the backend node.

     Fix is, unconditionally start health check process.
    </para>
    <para>
     Problem reported by Meng Feilong and reviewed by Tatsuo Ishii.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/140">Nodes in the down state cannot failback </ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-12-23 [515d5fe85]
    -->
    <para>
     Fix possible integer overflow. (Tatsuo Ishii)
    </para>
    <para>
     In <function>pool_write_flush()</function> and <function>pool_flus_it()</function> <function>write(2)</function> is used. <function>write(2)</function>
     returns ssize_t and in the code there are some places where the return
     value was assigned to an int variable. As a result it was possible
     that the return value was evaluated to negative value, which led to an
     error.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-15">
 <title>Release 4.4.15</title>
 <note>
  <title>Release Date</title>
  <simpara>2025-12-15</simpara>
 </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-12-08 [5bd10177c]
    -->
    <para>
     Use "grep -E" instead of deprecated "egrep" in pgpool_setup. (Bo Peng)
    </para>
    <para>
     Replace "egrep" with "grep -E" to avoid obsolescence warnings on newer GNU grep versions.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-12-08 [8deccc15e]
    -->
    <para>
     Fix buffer overflow error in show pool_status. (Tatsuo Ishii)
    </para>
    <para>
     "show pool_status", "pgpool show" and pcp_pool_status could cause a
     buffer overflow error. If backend_flag is set to "ALWAYS_PRIMARY",
     pool_flag_to_str(), which is responsible to produce printable format
     of backend_flag, wrote data past to the end of static buffer.
    </para>
    <para>
     Problem reported by zam bak and reviewed by Bo Peng.
    </para>
    <para>
     Discussion: <ulink url="https://www.postgresql.org/message-id/20251202.140205.427777414210613577.ishii%40postgresql.org">Re: "buffer overflow detected" when running SHOW POOL_STATUS</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-12-02 [c8865c703]
    -->
    <para>
     Fix memqcache_stats_start_time shown in "show pool_status". (Tatsuo Ishii)
    </para>
    <para>
     get_config() uses ctime() to generate printable form of
     memqcache_stats_start_time. But it did not take into account that
     ctime() adds newline at the end of result. As a result, not only the
     output of memqcache_stats_start_time was with unnecessary newline but
     next row printed empty items.
    </para>
    <para>
     Discussion: <ulink url="https://www.postgresql.org/message-id/20251130.102712.131456481338876013.ishii%40postgresql.org">Re: "buffer overflow detected" when running SHOW POOL_STATUS</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-14">
 <title>Release 4.4.14</title>
 <note>
  <title>Release Date</title>
  <simpara>2025-11-25</simpara>
 </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-11-07 [4fabca331]
    -->
    <para>
     Remove unnecessary <varname>application_name</varname> treatment. (Tatsuo Ishii)
    </para>
    <para>
     A previous commit added a step to set <varname>application_name</varname> when reusing existing connections.
     However, this is unnecessary because DISCARD ALL automatically resets <varname>application_name</varname>,
     and <function>send_params()</function> already sends all necessary parameter status messages, including <varname>application_name</varname>, to the frontend.
     Removing this redundant step also improves performance, particularly for backend nodes that are geographically distant.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/130">Severely degraded performance of pgPool in geo-distributed configurations</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-11-16 [b113027dd]
    -->
    <para>
     Fix segfault with <command>CopyOut</command>. (Tatsuo Ishii)
    </para>
    <para>
     When <command>COPY relname TO STDOUT</command> is executed in the extended query
     protocol mode, pgpool segfaulted.
    </para>
    <para>
     This problem is reported by <ulink url="https://github.com/tetesh">https://github.com/tetesh</ulink>.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/133">datanymizer and pg-pool segmentation fault</ulink>
    </para>
   </listitem>
   <listitem>
    <!--
    2025-10-03 [b84553bf0]
    -->
    <para>
     Prevent watchdog split-brain scenario in some corner cases. (Tatsuo Ishii)
    </para>
    <para>
     Watchdog uses both beacon messages and heartbeat for communication.
     If the heartbeat is not yet active, missing beacon messages
     for over 30 seconds can cause a split-brain scenario,
     where the old leader remains active while a new leader is elected.
     This change prevents two leaders from existing simultaneously by revoking the old leader.
     When a node detects that it has missed beacon messages from the leader more than twice,
     the leader is set to LOST and a new leader election is triggered via set_state(WD_JOINING).
    </para>
   </listitem>

   <listitem>
    <!--
    2025-10-03 [ef8ccb9e7]
    -->
    <para>
     Prevent FATAL error when non-existing prepared statement is given. (Tatsuo Ishii)
    </para>
    <para>
     Previously, <function>Bind()</function> raised a FATAL error when a non-existing prepared statement was used, unlike PostgreSQL.
     This change changes <function>Bind()</function> to check for the statement's existence and send an ERROR message to the frontend if it does not exist.
     Note that no log is written, as logging this is not currently possible.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-09-24 [59a359eef]
    -->
    <para>
     Fix <xref linkend="pg-enc"> not working if both -p and -P are provided. (Tatsuo Ishii)
    </para>
    <para>
     The original report showed that running pg_enc -p -P prompted for a password and encryption key,
     but failed if the key was not provided.
    </para>
    <para>
     Discussion: <ulink url="https://www.postgresql.org/message-id/7f18c30b.237.1997555ca11.Coremail.liujy%40highgo.com">pg_enc</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-09-18 [f20f7041c]
    -->
    <para>
     Fix compiling issue on 32-bit environments. (Tatsuo Ishii)
    </para>
    <para>
     On 32-bit systems, compiling src/parser/snprintf.c fails due to undefined functions <function>isnan()</function> and <function>isinf()</function>, which come from math.h.
     This change includes math.h and also reorders the include files for clarity.
     The file was originally imported from PostgreSQL, where math.h was already included.
     This fix was provided via pull request: https://github.com/pgpool/pgpool2/pull/128
    </para>
    <para>
     Discussion: <ulink url="https://www.postgresql.org/message-id/20250917.194736.353755422175293639.ishii%40postgresql.org">Compiling issues for 32-bit targets</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-09-10 [0a6868d40]
    -->
    <para>
     Fix safer directory deletion in Bash in recovery_1st_stage.sample. (Taiki Koshino)
    </para>
    <para>
     Quote variables in rm commands to avoid accidental deletion:
     <command>rm -rf "${DEST_NODE_PGDATA}"</command>

     If the variable is empty, rm could delete unexpected files or directories.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-09-05 [441f338ab]
    -->
    <para>
     Fix the compilation error when building without the <option>--with-memcached</option> option. (Tatsuo Ishii)
    </para>
    <para>
     A compiler error occurred when configuring without <option>--with-memcached</option>.
     The issue arose because the compiler could not determine that ptr would only be freed when memcached is enabled.
     To fix this, the relevant code block was wrapped with #ifdef USE_MEMCACHED.
    </para>
    <para>
     Problem reported by Bo Peng.
    </para>
   </listitem>
   <listitem>
    <!--
    2025-09-04 [9e0324575]
    -->
    <para>
     Fix query cache lock file handling. (Tatsuo Ishii)
    </para>
    <para>
     The query cache module creates a lock file in <varname>logdir</varname> for concurrency control,
     but two bugs existed: the main pgpool process could create a stray "QUERY_CACHE_LOCK_FILE",
     and the lock file was not removed on shutdown. This change fixes both issues.
    </para>
    <para>
     Problem reported and analyzed by Bo Peng.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-09-17 [1a975b539]
    -->
    <para>
     Update doc about "Setting up PostgreSQL standby" in <ulink url="https://www.pgpool.net/docs/latest/ja/html/example-cluster.html">8.2. Pgpool-II + Watchdog Setup Example</ulink>. (Taiki Koshino)
    </para>
    <para>
     Add a note that when setting up a standby without online recovery, do not write <varname>primary_conninfo</varname> to postgresql.auto.conf.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/67">Follow primary command not fixing postgresql.auto.conf</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-22 [5bd535792]
    -->
    <para>
     Fix watchdog_setup manual. (Tatsuo Ishii)
    </para>
    <para>
     It mistakenly stated that heartbeart is not setup in watchdog_setup.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-09-30 [3ddbc64f1]
    -->
    <para>
     Adapt 023.ssl_connection to PostgreSQL 18. (Tatsuo Ishii)
    </para>
    <para>
     PostgreSQL 18 heavily changed psql's \conninfo output format, which
     made the test fail because the test relies on \conninfo. This change
     makes the test script aware the PostgreSQL version to fix the issue.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-29 [b4043e6c3]
    -->
    <para>
     Fix ruby script in 010.rewrite_timestamp. (Tatsuo Ishii)
    </para>
    <para>
     The ruby script used "File.exists", which is said to be obsoleted in
     newer version of Ruby.  Replace it with "File.exist".
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-29 [9c901e60a]
    -->
    <para>
     Tweak timeout in 034 and 075 tests. (Tatsuo Ishii)
    </para>
    <para>
     034.promote_node and 075.detach_primary_left_down_node set the timeout
     60 seconds for finishing follow primary script.  It turns out that
     these timeout values are not long enough, and sometimes caused false
     errors. So make them from 60 seconds to 120 seconds.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-27 [42b177614]
    -->
    <para>
     Add ssl_ecdh_curve test to 023.ssl_connection. (Tatsuo Ishii)
    </para>
    <para>
     023.ssl_connection did not cover the test for ssl_ecdh_curve.  This
     commit tests it using bad ssl_ecdh_curve parameter to see if connection
     between frontend and pgpool fails.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-13">
 <title>Release 4.4.13</title>
 <note>
  <title>Release Date</title>
  <simpara>2025-08-21</simpara>
 </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-07-25 [75d905ff9]
    -->
    <para>
     Fix watchdog to print inappropriate NOTICE message. (Tatsuo Ishii)
    </para>
    <para>
     <function>read_ipc_socket_and_process()</function> printed a notice message every time when
     it wrote commands to IPC socket even if it was successful. Fix this to
     print the notice message only when the write failed.

     The reason why this bug was not recognized is, the message appears
     only when <varname>log_min_messages</varname> is set to notice or higher.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/121">pgpool IPC socket connection issue</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-07-19 [d05de5c73]
    -->
    <!--
    2025-07-19 [ed57af34e]
    -->
    <para>
     Fix resource leak while reading startup packet. (Tatsuo Ishii)
    </para>
    <para>
     Fix resource leak in pool_push_pending_data.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-30 [bac455b2f]
    -->
    <para>
     Fix broken scram-sha-256 authentication on big-endian machines. (Tatsuo Ishii)
    </para>
    <para>
     When <literal>scram-sha-256</literal> authentication is performed, a hash function
     <function>pg_sha_256_final</function> is used. It was imported from <productname>PostgreSQL</productname> and it uses
     preprocessor define WORDS_BIGENDIAN to judge host machine's
     endianness. Although WORDS_BIGENDIAN should be defined while
     configure, this part was missed when <function>pg_sha_256_final</function> (and others) was
     imported from <productname>PostgreSQL</productname>. As a result, <literal>scram-sha-256</literal> worked only in
     little endian machines. Fixed the issue by adding
     AC_C_BIGENDIAN macro to configure.ac.
    </para>
    <para>
     Problem reported by Christoph Berg and analyzed by pranavkaruvally.
    </para>
    <para>
     Discussion: <ulink url="https://github.com/pgpool/pgpool2/issues/106">4.6.1 fails on big-endian s390x: backend response with kind 'E' when expecting 'R'</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-23 [2721c7b76]
    -->
    <para>
     Fix source code typos. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-09 [4305c42d6]
    -->
    <para>
     Fix heartbeat device treatment. (Tatsuo Ishii)
    </para>
    <para>
     While processing <filename>pgpool.conf</filename>, <varname>heartbeat_device</varname> was mistakenly treated
     and the first device was ignored.
    </para>
    <para>
     Problem analyzed by Bo Peng.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-02 [06ba7dde4]
    -->
    <para>
     Fix typo in the comments of <filename>pgpool.conf</filename>. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-08-15 [a54f5d1ad]
    -->
    <para>
     Enhance "8.3. Replication Mode and Snapshot Isolation Mode Configuration Example" Document. (Taiki Koshino)
    </para>
    <para>
     Updated the link to the example script and the explanation in the "8.3.3. Before you begin" section.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-04 [e2f24fec8]
    -->
    <para>
     Fix documentation for parameters that are not reflected by reload. (Taiki Koshino)
    </para>
    <para>
     "authentication_timeout" and "memqcache_oiddir" is not reflected by reload.
     The documentation is changed to "This parameter can only be set at server start.".
    </para>
   </listitem>

   <listitem>
    <!--
    2025-07-24 [bc5fa5e7e]
    -->
    <!--
    2025-07-23 [1e8963554]
    -->
    <para>
     Unify watchdog leader terms (followup). (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2025-08-06 [31eee18d7]
    -->
    <!--
    2025-07-16 [34b07c2d5]
    -->
    <para>
     Fix example script link. (Taiki Koshino)
    </para>
    <para>
     Modified the sample script in the section "<ulink url="https://www.pgpool.net/docs/46/en/html/example-cluster.html">8.2. Pgpool-II + Watchdog Setup Example</ulink>"
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-18 [f4ae9f39e]
    2025-06-18 [7a20dc419]
    -->
    <para>
     Fix load balance explanation missed logical replication mode and Slony mode. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-18 [9d2e4e692]
    -->
    <para>
     Enhance <xref linkend="pcp-node-info"> document. (Bo Peng)
    </para>
    <para>
     Clarify that each <varname>backend_application_nameX</varname> must match the value specified
     in the <varname>application_name</varname> of <varname>primary_conninfo</varname> to correctly display
     "<varname>replication_state</varname>" and "<varname>replication_sync_state</varname>".
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-08 [59f9df005]
    -->
    <para>
     Add section of kernel resources. (Tatsuo Ishii)
    </para>
    <para>
     <productname>Pgpool-II</productname> uses System V shared memory and semaphores. It's better to
     describe the requirements in the docs.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-07 [40617fd90]
    -->
    <para>
     Add description for <option>--with-ldap</option> option of configure. (Tatsuo Ishii)
    </para>
    <para>
     It was missed when LDAP support was introduced in v4.2
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-04 [ff60bf930]
    -->
    <para>
     Clarify supported platforms for <productname>Pgpool-II</productname>. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2025-06-03 [cc4da5979]
    -->
    <para>
     Enhance <xref linkend="guc-child-life-time"> document. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-06-08 [78e45decf]
    -->
    <para>
     Stabilize 029.cert_passphrase regression test. (Tatsuo Ishii)
    </para>
    <para>
     When <varname>ssl_passphrase_command</varname> is not valid, the error message is
     typically "bad decrypt" but it seems sometimes "wrong tag".
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-12">
 <title>Release 4.4.12</title>
 <note>
  <title>Release Date</title>
  <simpara>2025-05-15</simpara>
 </note>

 <sect2>
  <title>Overview</title>
  <para>
   This release contains a security fix.
  </para>
  <para>
   An authentication bypass vulnerability exists in the client authentication
   mechanism of <productname>Pgpool-II</productname>.
   In <productname>Pgpool-II</productname>, authentication may be bypassed even
   when it is supposed to be enforced. As a result, an attacker could log in as
   any user, potentially leading to information disclosure, data tampering, or
   even a complete shutdown of the database. (CVE-2025-46801)
  </para>
  <para>
   This vulnerability affects systems where the authentication configuration
   matches one of the following patterns:
  </para>
  <itemizedlist>
   <listitem>
    <para>
     Pattern 1: This vulnerability occurs when all of the following conditions are met:
    </para>
    <itemizedlist>
     <listitem>
      <para>
       The <literal>password</literal> authentication method is used in
       <filename>pool_hba.conf</filename>
      </para>
     </listitem>
     <listitem>
      <para>
       allow_clear_text_frontend_auth = off
      </para>
     </listitem>
     <listitem>
      <para>
       The user's password is not set in <filename>pool_passwd</filename>
      </para>
     </listitem>
     <listitem>
      <para>
       The <literal>scram-sha-256</literal> or <literal>md5</literal> authentication
       method is used in <filename>pg_hba.conf</filename>
      </para>
     </listitem>
    </itemizedlist>
   </listitem>

   <listitem>
    <para>
     Pattern 2: This vulnerability occurs when all of the following conditions are met:
    </para>
    <itemizedlist>
     <listitem>
      <para>
       enable_pool_hba = off
      </para>
     </listitem>
     <listitem>
      <para>
       One of the following authentication methods is used in pg_hba.conf:
       <literal>password</literal>, <literal>pam</literal>, or <literal>ldap</literal>
      </para>
     </listitem>
    </itemizedlist>
   </listitem>

   <listitem>
    <para>
     Pattern 3: This vulnerability occurs when all of the following conditions are met:
    </para>
    <itemizedlist>
     <listitem>
      <para>
       Raw mode is used (backend_clustering_mode = 'raw')
      </para>
     </listitem>
     <listitem>
      <para>
       The <literal>md5</literal> authentication method is used in
       <filename>pool_hba.conf</filename>
      </para>
     </listitem>
     <listitem>
      <para>
       allow_clear_text_frontend_auth = off
      </para>
     </listitem>
     <listitem>
      <para>
       The user's password is registered in <filename>pool_passwd</filename> in plain
       text or AES format
      </para>
     </listitem>
     <listitem>
      <para>
       One of the following authentication methods is used in
       <filename>pg_hba.conf</filename>:
       <literal>password</literal>, <literal>pam</literal>, or <literal>ldap</literal>
      </para>
     </listitem>
    </itemizedlist>
   </listitem>
  </itemizedlist>
  <para>
   All versions of Pgpool-II 4.0 and 4.1 series, 4.2.0 to 4.2.21, 4.3.0 to 4.3.14,
   4.4.0 to 4.4.11, 4.5.0 to 4.5.6 and 4.6.0 are affected by this vulnerability.
   It is strongly recommended to upgrade to <productname>Pgpool-II</productname>
   4.6.1, 4.5.7, 4.4.12, 4.3.15 and 4.2.22 or later.
   Alternatively, you can modify your settings so that they do not match any of
   the vulnerable configuration patterns.
  </para>
 </sect2>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-05-02 [32dee13dd]
    -->
    <para>
     Add major version information to the configuration file. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-05-13 [bcc6727]
    -->
    <para>
     Fix incorrect client authentication in some cases. (Tatsuo Ishii)
    </para>
    <para>
     If enable_pool_hba = on, it's auth method is "password", no
     password is registered in pool_passwd, and auth method in
     pg_hba.conf is "scram-sha-256" or "md5", for the first time when
     a client connects to pgpool, authentication is performed as
     expected. But if a client connects to the cached connection, any
     password from the client is accepted.
    </para>
    <para>
     Also if enable_pool_hba = off, in some cases a client is not
     asked password for the first time, or when a client connects to
     cached connection, even if it should be.
    </para>
    <para>
     In addition to fixing above, following changes are made:
    </para>
    <itemizedlist>
     <listitem>
      <para>
       Remove single PostgreSQL code path to simplify the authentication code.
      </para>
     </listitem>
     <listitem>
      <para>
       Remove crypt authentication support for frontend and
       backend. The feature had not been documented and never
       tested. Moreover crypt authentication was removed long time
       ago in PostgreSQL (8.4, 2009).
      </para>
     </listitem>
     <listitem>
      <para>
       Add new regression test "040.client_auth". The test performs
       exhaustive client authentication tests using a test
       specification file formatted in CSV.
      </para>
     </listitem>
    </itemizedlist>
   </listitem>
   <listitem>
    <!--
    2025-05-08 [e3451b560]
    -->
    <para>
     Fix long standing bind bug with query cache. (Tatsuo Ishii)
    </para>
    <para>
     When a named statement is prepared, it is possible to bind then execute without a parse message.
     Problem is, table oids which are necessary to invalidate query cache at execute or COMMIT was
     collected only in parse messages process (Parse()). Thus if bind is executed
     without parse after previous execute, no table oids were collected, and pgpool failed to invalidate query cache.
     Fix is collecting table oids at bind time too.
     Add regression test to 006.memqcache.
    </para>
    <para>
     Problem reported by and test program provided by Achilleas Mantzios.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2025-April/009430.html">[pgpool-general: 9427] Clarification on query results cache visibility</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-05-02 [1dfacffed]
    -->
    <para>
     Fix query cache invalidation bug. (Tatsuo Ishii)
    </para>
    <para>
     When an execute message is received, pgpool checks its max number of rows paramter. If it's not zero,
     pgpool sets "partial_fetch" flag to instruct pool_handle_query_cache() to not create query cache.
     Problem is, commit 2a99aa5d1 missed that even INSERT/UPDATE/DELETE sets the execute message parameter to non 0 (mostly 1)
     and pgpool set the flag for even none SELECTs. This resulted in failing to invalidate query cache because if the flag is true,
     subsequent code in pool_handle_query_cache() skips cache invalidation.
     To fix this change Execute() to check if the query is read only SELECT before setting the flag.
     Also add test to 006.memqcache.
    </para>
    <para>
     Problem reported by and a test program provided by Achilleas Mantzios.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2025-April/009430.html">[pgpool-general: 9427] Clarification on query results cache visibility</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2025-05-05 [5947ba418]
    -->
    <para>
     Fix portability to OpenBSD. (Tatsuo Ishii)
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2025-May/004583.html">[pgpool-hackers: 4582] Make pgpool build on OpenBSD</ulink>
    </para>
    <para>
     The patch was created by Martijn van Duren.
    </para>
   </listitem>
   <listitem>
    <!--
    2025-05-01 [14c94473b]
    -->
    <para>
     Fix json_writer did not properly encode special characters. (Bo Peng)
    </para>
    <para>
     <productname>Pgpool-II</productname> would crash when the watchdog was enabled if <xref linkend="guc-wd-authkey"> contained special characters (e.g., a backslash).
    </para>
    <para>
     The patch was created by Martijn van Duren and slightly modified by Bo Peng.
    </para>
   </listitem>
   <listitem>
    <!--
    2025-03-04 [e1e32536f]
    -->
    <para>
      Fix sr check and health check to reopen <xref linkend="guc-pool-passwd"> upon reload. (Tatsuo Ishii)
    </para>
    <para>
      The streaming replication check and health check process forgot to
      reopen <xref linkend="guc-pool-passwd"> upon reload.  If <xref linkend="guc-sr-check-password"> or
      <xref linkend="guc-health-check-password"> is empty string, the password is obtained from
      <xref linkend="guc-pool-passwd">. Thus those process read outdated content of <xref linkend="guc-pool-passwd">
      upon reload.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-04-24 [e50114280]
    -->
    <para>
     Enhance the description on <xref linkend="guc-connection-life-time"> (Tatsuo Ishii)
    </para>
    <para>
     <xref linkend="guc-connection-life-time"> is a config value to determine the life time of
     cached connections to <productname>PostgreSQL</productname> 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.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2025-April/004578.html">[pgpool-hackers: 4577] Doc: enhance the description on connection_life_time</ulink>
    </para>
   </listitem>
   <listitem>
    <!--
    2025-03-05 [a3086943f]
    -->
    <para>
     Enhance the explanation on <xref linkend="guc-sr-check-user">. (Tatsuo Ishii)
    </para>
    <para>
     It must be a superuser or in the <literal>pg_monitor</literal> group.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-11">
 <title>Release 4.4.11</title>
  <note>
   <title>Release Date</title>
   <simpara>2025-02-28</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-02-26 [b6d160f]
    -->
    <para>
     Remove <command>pg_basebackup</command> from the sample follow primary script. (Bo Peng)
    </para>
    <para>
     If <command>pg_rewind</command> fails, the safest way for users is to recover manually.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-01-31 [3536f80]
    -->
    <para>
     Fix <function>per_node_error_log()</function> error message that is printed with two colons. (Bo Peng)
    </para>
    <para>
     Patch is created by Umar Hayat.
    </para>
   </listitem>

   <listitem>
    <!--
    2025-01-12 [15c0a5b]
    -->
    <para>
     Fix <function>pool_signal</function>. (Tatsuo Ishii)
    </para>
    <para>
     Previously pool_signal did not set SA_RESTART flag.  Thus any system
     calls interrupted by a signal does not restart. Some of our code are
     prepared so that they restart if a system call is interrupted by a
     signal. But not sure all places are prepared too. So add the
     flag. Note, <productname>PostgreSQL</productname> always uses the flag.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-12-09 [8d4fb84]
    -->
    <para>
     Fixed an issue where <command>pg_md5</command> and
     <command>pg_enc</command> would not update the password
     file if a file other than the default value was specified
     in the <xref linkend="guc-pool-passwd"> parameter. (Bo Peng)
    </para>
    <para>
     This issue is reported by Sadhuprasad Patro.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-12-04 [6489bb0]
    2024-12-11 [2a99aa5]
    -->
    <para>
     Fix several query cache bugs in streaming replication mode. (Tatsuo Ishii)
    </para>
    <itemizedlist>
     <listitem>
      <para>
       When query cache is enabled and an execute message is sent from
       frontend, <productname>Pgpool-II</productname> injects query cache
       data into backend message buffer if query cache data is available.
       But it was possible that the cached message is inserted at
       inappropriate position and <productname>Pgpool-II</productname>
       mistakenly raised "kind mismatch" error.
      </para>
     </listitem>
     <listitem>
      <para>
       If query cache is enabled and query is operated in extended query mode
       and pgpool is running in streaming replication mode, an execute
       message could return incorrect results.
      </para>
     </listitem>
     <listitem>
      <para>
       Another trouble is when multiple execute messages are sent
       consecutively.  In this case Pgpool-II returned exactly the same
       results from query cache for each execute message. This is wrong since
       the second or subsequent executes should return 0 rows.
      </para>
      <para>
       Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-December/004548.html">[pgpool-hackers: 4547] Bug in query cache</ulink>
      </para>
     </listitem>
    </itemizedlist>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-01-17 [3db1305]
    -->
    <para>
     Enhance client authentication chapter. (Tatsuo Ishii)
    </para>
    <para>
     Add intro about pool_passwd. Previously there was only description on
     pool_hba.conf in the overview page. A general guide to
     <xref linkend="guc-pool-passwd">
     will help users to understand this chapter.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2025-01-14 [0a38c5d]
    -->
    <para>
     Stabilize 032.dml_adaptive_loadbalance (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-10">
 <title>Release 4.4.10</title>
  <note>
   <title>Release Date</title>
   <simpara>2024-11-28</simpara>
  </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-11-26 [48502ce]
    -->
    <para>
     Abort SSL negotiation if backend sends an error message. (Tatsuo Ishii)
    </para>
    <para>
     In the client side implementation of SSL negotiation
     (pool_ssl_negotiate_clientserver()), it was possible for a
     man-in-the-middle attacker to send a long error message to confuse
     Pgpool-II or client while in the SSL negotiation phase. This commit
     rejects the negotiation immediately (issue a FATAL error) and exits
     the session to prevent such an attack.
    </para>
    <para>
     This resembles PostgreSQL's CVE-2024-10977.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-11-25 [81ff539]
    -->
    <para>
     Fix the watchdog process not reloading configurations. (Bo Peng)
    </para>
    <para>
     The <function>reload_config()</function> function
     in <productname>Pgpool-II</productname> should send
     a SIGHUP signal to the watchdog process.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-11-15 [ffabbed]
    -->
    <para>
     Fix bug in <function>do_query</function>. (Tatsuo Ishii)
    </para>
    <para>
     Fix <function>do_query</function> to use ntohs/ntohl instead of htons/htonl.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-11-13 [c81e354]
    -->
    <para>
     Fix authentication failure after updating <filename>pool_passwd</filename> and reload. (Tatsuo Ishii)
    </para>
    <para>
     If <filename>pool_hba.conf</filename> is disabled,
     updating pool_passwd was not recognized
     by <productname>Pgpool-II</productname> child process even
     if <productname>Pgpool-II</productname> reload was performed.
     The reload processing function check_config_reload() mistakenly assumed
     that reopening pool_passwd was only necessary when
     <xref linkend="guc-enable-pool-hba"> is on.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-November/001944.html">https://www.pgpool.net/pipermail/pgpool-general/2024-November/001944.html"</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-11-11 [f3a98a4]
    2024-11-12 [897147b]
    -->
    <para>
     Fix <command>COPY</command> hangs. (<ulink url="https://github.com/pgpool/pgpool2/issues/79">#79</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     During COPY IN state (i.e. COPY FROM STDIN), frontend can send Flush
     or Sync messages.  According to the F/B protocol specification, they
     should be ignored but Pgpool-II treated as an invalid message and this
     causes COPY hung.
    </para>
    <para>
     Also a regression test is added for this issue.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-11-09 [a690ce0]
    -->
    <para>
     Fix <productname>Pgpool-II</productname> child process crash during shutdown. (Tatsuo Ishii)
    </para>
    <para>
     The actual crash was in <function>close_all_backend_connections()</function>.
     <function>close_all_backend_connections()</function> was
     called because on_system_exit registers
     <function>child_will_go_down()</function>.
     At the moment it seems pgpool child had just started up and doing
     <function>pool_init_cp()</function>. The connection pool
     object had not been completely initialized, that's cause of the crash.
    </para>
    <para>
     Problem reported and analyzed by Emond Papegaaij.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-November/001938.html">https://www.pgpool.net/pipermail/pgpool-general/2024-November/001938.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-10-26 [33a2f2c]
    -->
    <para>
     Fix sporadic health check failures due to authentication failure. (Tatsuo Ishii)
    </para>
    <para>
     When <xref linkend="guc-health-check-password"> is empty string,
     health check process looks for the password from pool_passwd file.
     Problem is, the file descriptor for the file is inherited from
     parent pgpool process.
     This means that pgpool main and health check process (possibly multiple
     process) share the same descriptor, which causes various problem
     including the issue reported here. To fix the problem, re-open the
     file when health check process starts so that each health check
     process owns its own file descriptor.
    </para>
    <para>
     Note that pgpool child process (responsible for frontend sessions)
     already re-opens the file descriptor and they are not related to the
     issue.
    </para>
    <para>
     Problem reported and analyzed by Emond Papegaaij.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-October/001913.html">https://www.pgpool.net/pipermail/pgpool-general/2024-October/001913.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-10-23 [1a66900]
    -->
    <para>
     Optimize query cache invalidation for <literal>ALTER ROLE</literal>. (Tatsuo Ishii)
    </para>
    <para>
     Commit <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=6b7d585eb1c693e4ffb5b8e6ed9aa0f067fa1b89">6b7d585eb1c693e4ffb5b8e6ed9aa0f067fa1b89</ulink> invalidates query
     cache if any <literal>ALTER ROLE/USER</literal> statement is used.
     Actually this is an overkill.
     Because following queries do not affect the privilege of the role.
    </para>
    <programlisting>
ALTER ROLE user WITH [ENCRYPTED] PASSWORD
ALTER ROLE user WITH CONNECTION LIMIT
    </programlisting>
    <para>
     So do not invalidate query cache if those commands are used.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-October/004532.html">https://www.pgpool.net/pipermail/pgpool-hackers/2024-October/004532.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-09-18 [04142b4]
    -->
    <para>
     Fix <productname>Pgpool-II</productname> crash when pgpool child process exits. (Tatsuo Ishii)
    </para>
    <para>
     When a pgpool child process exits,
     <function>close_all_backend_connections()</function> is
     called, which is responsible for closing all connections to backend in
     the connection pool. It used mistakenly MAIN_CONNECTION macro, which
     is fine for current active connections but is not good for pooled
     connections because a main node could be different at the time when
     the connection pool was created.
     Fix is using <function>in_use_backend()</function> instead.
    </para>
    <para>
     Reported-by: Emond Papegaaij
    </para>
   </listitem>

   <listitem>
    <!--
    2024-09-14 [794adad]
    -->
    <para>
     Fix bug in replication/snapshot isolation mode. (<ulink url="https://github.com/pgpool/pgpool2/issues/69">#69</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     When <command>INSERT</command> command is received,
     pgpool automatically issues table LOCK command to the
     target table but it forgot to send the command to
     other than main nodes. This only happened in extended query mode.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-09-14 [10333d5]
    -->
    <para>
     Fix another bug in native replication/snapshot isolation mode. (Tatsuo Ishii)
    </para>
    <para>
     insert_lock() forgot to send row lock command (lock_kind == 3 case) to
     other than main node.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-09-14 [12e1b78]
    2024-09-10 [f60aaf4]
    -->
    <para>
     Fix resource leaks in <filename>pool_memqcache.c</filename>. (Tatsuo Ishii)
    </para>
    <para>
     These leaks were brought in by commit <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=6fdba5c33">6fdba5c33</ulink>.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-10-03 [bf46b3d]
    -->
    <para>
     Fix typos in the documentation and sample configuration files. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-11-25 [8b7af6a]
    2024-11-25 [36100bd]
    -->
    <para>
     Adapt 024.cert_auth test to OpenSSL 3.2. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-9">
 <title>Release 4.4.9</title>
  <note>
   <title>Release Date</title>
   <simpara>2024-09-09</simpara>
  </note>

 <sect2>
  <title>Overview</title>
  <para>
   This release contains a security fix.
  </para>
  <para>
   When the query cache (<xref linkend="runtime-in-memory-query-cache">) feature is enabled,
   it was possible that a database user can read rows from tables that should
   not be visible for the user through query cache (CVE-2024-45624).
  </para>
  <para>
   All versions of <productname>Pgpool-II</productname> older than
   4.5.4, 4.4.9, 4.3.12, 4.2.19, 4.1.22, and all older
   versions that has the query cache feature (the query cache feature was
   implemented in 3.2) are affected by the vulnerability.
  </para>

  <itemizedlist>
   <listitem>
    <para>
     If query cache is created for a table for a user, and then the
     access right of the table is revoked from the user by
     <command>REVOKE</command> command, still it was possible for the
     user to access the table which the user does not have the access
     right through the query
     cache.
    </para>
   </listitem>

   <listitem>
    <para>
     If query cache is created for a table for user A, and then other
     user B accesses the table via <command>SET ROLE</command> or
     <command>SET SESSION_AUTHORIZATION</command> in the same session,
     still it was possible for the user B to access the table which B
     does not have the access right through the query
     cache.
    </para>
   </listitem>

   <listitem>
    <para>
     If query cache is created for a row security enabled table for user
     A, and then other user B accesses the table via <command>SET ROLE</command>
     or SET <command>SESSION_AUTHORIZATION</command> in the same session,
     it was possible for the user B to retrieve rows which should not be
     visible from the user B through the query cache.
    </para>
   </listitem>

  </itemizedlist>
  <para>
   It is strongly recommend to upgrade to <productname>Pgpool-II</productname>
   4.5.4, 4.4.9, 4.3.12, 4.2.19 and 4.1.22 or later. Or you should better turn
   off the query cache feature.
  </para>

  <para>
   Note that to fix the vulnerability, some commands (ALTER DATABASE,
   ALTER ROLE, ALTER TABLE, REVOKE) now invalidate whole query cache
   data. This may affect the performance when using the query cache
   feature.
  </para>
 </sect2>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-08-15 [730acde]
    -->
    <para>
     Back port <xref linkend="guc-notice-per-node-statement">. (Tatsuo Ishii)
    </para>
    <para>
     This is mainly for testing. Backpatch-through: v4.1
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-August/004505.html">[pgpool-hackers: 4504]</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-08-09 [1f200d7]
    2024-08-11 [ce7ed50]
    -->
    <para>
     Fix bugs in replication mode and snapshot isolation mode. (Tatsuo Ishii)
    </para>
    <para>
     The following bugs was fixed:
    </para>
    <itemizedlist>
     <listitem>
      <para>
       In replication mode and snapshot isolation mode when a command finishes,
       <productname>Pgpool-II</productname> waits for a ready for query message
       but forgot that some commands (for example <command>SET ROLE</command>)
       produces a parameter status message. As a result
       <productname>Pgpool-II</productname> errors
       out that other message arrives before the ready for query message.
      </para>
     </listitem>

     <listitem>
      <para>
       If previous query produces parameter status message, subsequent
       <function>parse()</function> needs to read and process it because
       it wants to read Ready for query message which is supposed to follow
       the parameter status message.
       However when <function>ParameterStatus()</function> gets called,
       the query in progress flag was set and it was possible that only
       one of parameter status message from backend was processed if the
       query processed in this <function>parse()</function> call is load
       balanced. It is likely that the parameter status message comes from
       all live backend because they are generated by <command>SET</command>
       command, and <command>SET</command> command are sent to all live backend
       in replication mode and snapshot isolation mode. So unset the query in
       progress flag before calling <function>ParameterStatus()</function>.
      </para>
     </listitem>
    </itemizedlist>
   </listitem>

  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-8">
 <title>Release 4.4.8</title>
  <note>
   <title>Release Date</title>
   <simpara>2024-08-15</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-08-02 [97485f6]
    -->
    <para>
     Use <command>psql -V</command> instead of <command>initdb -V</command>
     in sample scripts. (Bo Peng)
    </para>
    <para>
     Use <command>psql -V</command> instead of <command>initdb -V</command>
     in the sample scripts because in some cases postgresqlxx-server may not
     be installed.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-07-30 [251e422]
    -->
    <para>
     Fix hang after a flush message received. (<ulink url="https://github.com/pgpool/pgpool2/issues/59">#59</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2024-07-22 [c1dd550]
    -->
    <para>
     Fix segmentation fault. (Tatsuo Ishii)
    </para>
    <para>
     It is reported that pgpool child segfaulted in pool_do_auth. The cause
     was MAIN_CONNECTION() returns NULL. It seems my_main_node_id was set
     to incorrect node id 0, which was actually in down status. thus there
     was no connection in cp->slots[0].
    </para>
    <para>
     Problem is reported by Emond Papegaaij.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-July/001852.html">[pgpool-general: 9175]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-07-19 [49340b9]
    -->
    <para>
     Fix dynamic process management. (Tatsuo Ishii)
    </para>
    <para>
     Calculation of pooled_connection, which is used by the process
     eviction algorithm, was not correct. The number always resulted in
     max_pool. Also more comments are added.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-July/004491.html">[pgpool-hackers: 4490]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-28 [8ea6f7a]
    -->
    <para>
     Fixed segmentation fault at parsing config file. (Tatsuo Ishii)
    </para>
    <para>
     This commit fixed a segmentation fault that occurs when parsing pgpool.conf
     if the setting value was not enclosed in single quotes.
    </para>
    <para>
     The patch is created by Carlos Chapi, reviewed and modified by Tatsuo Ishii.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-21 [7ca9b23]
    -->
    <para>
     Fix segfault to not use MAIN_NODE macro. (Tatsuo Ishii)
    </para>
    <para>
     Some functions (close_idle_connection(), new_connection() and
     pool_create_cp()) used MAIN* and VALID_BACKEND where they are not
     appropriate. MAIN* and VALID_BACKEND are only useful against current
     connections to backend, not for pooled connections since in pooled
     connections which backend is the main node or up and running is
     necessarily same as the current connections to backend.
     The misuses of those macros sometimes leads to segfault.
    </para>
    <para>
     Problem is reported by Emond Papegaaij.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-June/009176.html">[pgpool-general: 9114]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-21 [152c65d]
    -->
    <para>
     Fix MAIN_NODE macro (actually pool_virtual_main_db_node_id()). (Tatsuo Ishii)
    </para>
    <para>
     The macro used to return REAL_MAIN_NODE_ID if there's no session context.
     This is wrong since REAL_MAIN_NODE_ID can be changed any time when
     failover/failback happens. 
    </para>
    <para>
     Suppose REAL_MAIN_NODE_ID == my_main_node_id == 1. 
     Then due to failback, REAL_MAIN_NODE_ID is changed to 0.
     Then MAIN_CONNECTION(cp) will return NULL and any
     reference to it will cause segmentation fault. To prevent the issue we
     should return my_main_node_id instead.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-14 [9488d9f]
    -->
    <para>
     Fix <command>show pool_processes</command> to not show row description twice. (Tatsuo Ishii)
    </para>
    <para>
     processes_reporting() accidentaly called both send_row_description()
     and send_row_description_and_data_rows().
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-June/004472.html">[pgpool-hackers: 4471]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-11 [8c18899]
    -->
    <para>
     Fix segfault in a child process. (Tatsuo Ishii)
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-May/001780.html">[pgpool-general: 9104]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-11 [93ba28b]
    -->
    <para>
     Watchdog dies and kills pgpool2 when network gets shortly interrupted. (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=823">#823</ulink>) (Muhammad Usama)
    </para>
    <para>
     With network monitoring enabled, a <productname>Pgpool-II</productname>
     node would shut down immediately if it lost all network interfaces or
     assigned IP addresses, providing extra protection by quickly removing
     a non-communicative node from the cluster.
    </para>
    <para>
     The issue was that <productname>Pgpool-II</productname> responded to network blackout events even when network
     monitoring was disabled. This fix ensures that the network monitoring socket is
     not opened when network monitoring is not enabled, preventing unnecessary shutdowns.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-10 [c90ec3b]
    -->
    <para>
     Fix <command>pgpool reset</command> command not working if watchdog is enabled. (Tatsuo Ishii)
    </para>
    <para>
     Bug reported and problem analysis by keiseo.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-June/004466.html">[pgpool-hackers: 4465]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-04 [0574a5d]
    -->
    <para>
     Fix <literal>psql_scan</literal> crash. (<ulink url="https://github.com/pgpool/pgpool2/issues/54">#54</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     It was reported that <literal>psql_scan</literal> crashes while determining whether a
     string in a long query is psql variable (i.e. starting with ":") or not.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-06-07 [cb4ecf0]
    -->
    <para>
     Mega typo fix for docs and program source codes. (Tatsuo Ishii)
    </para>
    <para>
     Patch is created by Umar Hayat.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-08-01 [d9fd431]
    -->
    <para>
     Add the criteria for selecting processes to be killed to <xref linkend="guc-max-spare-children">. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2024-07-30 [d8f8cca]
    -->
    <para>
     Enhance failover document. (Tatsuo Ishii)
    </para>
    <para>
     Clarify the condition on failover when <xref linkend="guc-failover-on-backend-shutdown"> is enabled.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-06-19 [36112da]
    -->
    <para>
     Add the missing default values for virtual IP related parameters. (Bo Peng)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-7">
 <title>Release 4.4.7</title>
  <note>
   <title>Release Date</title>
   <simpara>2024-05-16</simpara>
  </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-05-01 [afa710e]
    -->
    <para>
     Fix compiler error with <literal>-Werror=implicit-function-declaration</literal>. (Bo Peng)
    </para>
    <para>
     Add <literal>LDAP_DEPRECATED</literal> to include prototypes for deprecated ldap functions.
     Also Add missing header files in autoconf check.
    </para>
    <para>
     Patch is created by Vladimir Petko.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-04-04 [ad42306]
    2024-04-04 [9dee833]
    -->
    <para>
     Fix assorted causes of segmentation fault. (Tatsuo Ishii)
    </para>
    <para>
     It is reported that pgpool and its child process segfault in certain
     cases when failover involved.
    </para>
    <para>
     Problem is reported and analyzed by Emond Papegaaij.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-April/009131.html">https://www.pgpool.net/pipermail/pgpool-general/2024-April/009131.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-04-03 [cd4482d]
    -->
    <para>
     Fix uninitialized memory error. (Tatsuo Ishii)
    </para>
    <para>
     It was reported that valgrind found several errors including an
     uninitialized memory error in read_startup_packet. It allocates memory
     for user name in a startup packet in case cancel or SSL request using
     palloc, and later on the memory is used by pstrdup. Since memory
     allocated by palloc is undefined, this should have been palloc0.
    </para>
    <para>
     Problem is reported and analyzed by Emond Papegaaij.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-April/009126.html">https://www.pgpool.net/pipermail/pgpool-general/2024-April/009126.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-04-02 [ba6142f]
    -->
    <para>
     Fix errors/hung up when load_balance_mode is off. (Tatsuo Ishii)
    </para>
    <para>
     Commit <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=3f3c1656">3f3c1656</ulink>
     brought errors/hung up when load_balance_mode is off, primary node id
     is not 0 and queries are BEGIN etc.
    </para>
    <para>
     Bug found and analyzed by Emond Papegaaij.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-March/009113.html">https://www.pgpool.net/pipermail/pgpool-general/2024-March/009113.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-25 [93ee49f]
    -->
    <para>
     Fix compile errors with certain CFLAGS. (Tatsuo Ishii)
    </para>
    <para>
     <ulink url="https://github.com/pgpool/pgpool2/issues/42">https://github.com/pgpool/pgpool2/issues/42</ulink>
     reported that with CFLAGS
     -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
     gcc emits errors.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-March/004443.html">https://www.pgpool.net/pipermail/pgpool-hackers/2024-March/004443.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-25 [1a15495]
    -->
    <para>
     Fix comments in sample pgpool.conf. (Bo Peng)
    </para>
    <para>
     The default value for <varname>sr_check_period</varname> should be 10 seconds.
     Also fixed some typos in comments.
    </para>
    <para>
     Patch is created by hiroin and modified by Bo Peng.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-21 [9054387]
    -->
    <para>
     Allow reset queries to run even if extended queries do not end. (Tatsuo Ishii)
    </para>
    <para>
     Commit <ulink url="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=240c668d">240c668d</ulink>
     caused reset queries fail if extended query messages do not end. This commit
     fix that by checking whether we are running reset queries in
     SimpleQuery(). Also add the test case for this.
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-21 [710875a]
    2024-03-20 [2a7a38b]
    -->
    <para>
     Fix memory leak pointed out by Coverity. (Takuma Hoshiai)
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-18 [02452a6]
    -->
    <para>
     Guard against inappropriate protocol data. (Tatsuo Ishii)
    </para>
    <para>
     If a simple query message arrives before a sequence of extended query
     messages ends pgpool could hang.  This is because the query context in
     the session context for the simple query is overwritten by the query
     contexts of the extended query messages.
    </para>
    <para>
     This commit implements a guard in SimpleQuery() by checking whether
     extended query protocol messages ended. If they do not end, raise a
     FATAL error. A known example detected by this checking is JDBC
     driver's "autosave=always" option. This means pgpool will not accept
     the option after this commit until the issue (sending a simple
     protocol message before ending extended query message protocol) is
     fixed by the JDBC driver side.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-February/004428.html">https://www.pgpool.net/pipermail/pgpool-hackers/2024-February/004428.html</ulink>
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-04-03 [8986a8b]
    -->
    <para>
     Enhance "Upstream server connection" documentation. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-28 [062d4c9]
    -->
    <para>
     Language cleanup in Japanese document. (Masaya Kawamoto)
    </para>
   </listitem>

   <listitem>
    <!--
    2024-03-27 [0b8f377]
    -->
    <para>
     Add the note about using <command>pcp_promote_node</command> when two postgres nodes. (Masaya Kawamoto)
    </para>
    <para>
     Even if there are two postgres nodes, there are cases that
     <varname>follow_primary_command</varname> is required to be set.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>

   <listitem>
    <!--
    2024-03-16 [927d7ae]
    2024-03-15 [8e17321]
    -->
    <para>
     Fixed regression test 005.jdbc to avoid Java 21 deprecation warnings. (Bo Peng)
    </para>
    <para>
     Replace Runtime.exec(String) with Runtime.exec(String[]) to avoid Java 21 deprecation warnings.
     Patch is created by Vladimir Petko and modified by Bo Peng.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-6">
 <title>Release 4.4.6</title>
  <note>
   <title>Release Date</title>
   <simpara>2024-02-29</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-02-27 [aea5a51]
    -->
    <para>
     Remove restore_command from sample scripts. (Bo Peng)
    </para>
    <para>
     Restore_command is not required because replication slot is enabled.
     It causes occasional failover failure.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-02-26 [5a25a29]
    -->
    <para>
     Fixed the default values of <xref linkend="guc-recovery-user">,
     <xref linkend="guc-failover-on-backend-shutdown"> and
     <xref linkend="guc-insert-lock">. (Bo Peng)
    </para>
    <para>
     Because the default value of <varname>recovery_user</varname>
     should be same as <xref linkend="guc-health-check-user"> and
     <xref linkend="guc-sr-check-user">, I changed the default value
     from '' to 'nobody'.
    </para>
    <para>
     The correct default value of <varname>failover_on_backend_shutdown</varname>
     should be "false" and the correct default value of <varname>insert_lock</varname>
     should be "on".
    </para>
   </listitem>

   <listitem>
    <!--
    2024-02-10 [85570e1]
    -->
    <para>
     Fixed <xref linkend="guc-statement-level-load-balance"> with BEGIN etc. (Tatsuo Ishii)
    </para>
    <para>
     When <varname>statement_level_load_balance</varname> is enabled,
     BEGIN/END/COMMIT/ABORT/SET/SAVEPOINT/RELEASE SAVEPOINT/DEALLOCATE
     ALL/DISCARD were sent to primary node and all standby nodes even if
     <xref linkend="guc-load-balance-mode"> is off.
     This is not only plain wrong but caused slow
     down if one of the standby nodes are in remote network.
    </para>
    <para>
     Fix this in that pgpool sends such queries to primary node only when
     <varname>load_balance_mode</varname> is off.
    </para>
    <para>
     Reported: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2024-January/009059.html">https://www.pgpool.net/pipermail/pgpool-general/2024-January/009059.html</ulink>
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2024-February/004423.html">https://www.pgpool.net/pipermail/pgpool-hackers/2024-February/004423.html</ulink>
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2024-02-26 [ed49149]
    -->
    <para>
     Fix Japanese watchdog document. (Tatsuo Ishii)
    </para>
    <para>
     It mistakenly used "master" watchdog node instead of "leader".
    </para>
   </listitem>

   <listitem>
    <!--
    2024-02-26 [99c657f]
    -->
    <para>
     Fix English watchdog document. (Tatsuo Ishii)
    </para>
    <para>
     It mistakenly used "main" PostgreSQL node instead of "primary".

    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-5">
 <title>Release 4.4.5</title>
  <note>
   <title>Release Date</title>
   <simpara>2023-11-30</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-11-17 [823cfd9]
    -->
    <para>
     Modify the replication slot name conversion in sample scripts
     to support for the hostname in uppercase. (Bo Peng)
    </para>
    <para>
     Replication slots are automatically created or deleted in the scripts
     which are executed during failover or online recovery.
     Since uppercase can't be used for a replication slot name, modify these scripts
     to convert the hostname to lowercase.
    </para>
    <para>
     Patch is created by Sheikh Wasiu Al Hasib and modified by Bo Peng.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-10-06 [5c9b377]
    -->
    <para>
     Add SSH timeout in sample script <filename>escalation.sh.sample</filename>
     which is set in <xref linkend="guc-wd-escalation-command"> parameter. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-10-04 [6075d59]
    -->
    <para>
     Remove unnecessary logging line. (Tatsuo Ishii)
    </para>
    <para>
     Debug message "unset_tx_started_by_multi_statement_query is called in CommandComplete" was accidentally left.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-09-29 [72a171c]
    2023-09-29 [2036eac]
    -->
    <para>
     Fix <function>Describe()</function> so that it does not abort with portal created by <command>DECLARE</command>. (Tatsuo Ishii)
    </para>
    <para>
     When <command>DECLARE foo CURSOR FOR</command> is executed,
     a portal named "foo" is automatically created by PostgreSQL.
     As the portal is not managed by Pgpool-II, 
     "Describe foo" message failed with "unable to execute Describe.
     unable to get the bind message" error.
    </para>
    <para>
     To fix this, make <function>Describe()</function> create a dummy write query
     context so that the describe message is sent to primary (streaming replication
     mode) or all nodes (replication/snapshot isolation mode).
    </para>
    <para>
     Also add test case 080 for this commit.
    </para>
    <para>
     This problem was reported and analyzed by Heather Lapointe.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2023-September/008995.html">https://www.pgpool.net/pipermail/pgpool-general/2023-September/008995.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-10-03 [9b95270]
    2023-10-07 [f6b8228]
    2023-09-20 [3763441]
    -->
    <para>
     Remove duplication definitions of <varname>NAMEDATALEN</varname>. (Tatsuo Ishii)
    </para>
    <para>
     The definition for <varname>NAMEDATALEN</varname> is now in
     <filename>src/include/pg_config_manual.h</filename> only.
     Also replace <varname>POOL_NAMEDATALEN</varname> with
     <varname>NAMEDATALEN</varname> in
     <filename>src/utils/pool_select_walker.c</filename>.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-August/004366.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-August/004366.html</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-11-29 [42dc580]
    -->
    <para>
     Modify "Pgpool-II + Watchdog Setup Example" to mention that
     <varname>pcp_listen_addresses = '*'</varname> is required to
     allow PCP to listen on all addresses.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-09-19 [fff663e]
    -->
    <para>
     Fix <xref linkend="pcp-node-info"> docs. (Tatsuo Ishii)
    </para>
    <para>
     The actual backend status is obtained using PQpingParams, not pg_isready.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-08-21 [d7256e1]
    -->
    <para>
     Enhance <xref linkend="guc-follow-primary-command"> manual. (Tatsuo Ishii)
    </para>
    <para>
     Mention that it is necessary to run <xref linkend="pcp-attach-node"> if
     <xref linkend="pcp-recovery-node"> is not used.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-08-21 [957f983]
    -->
    <para>
     Enhance <command>pgpool_setup</command>. (Tatsuo Ishii)
    </para>
    <para>
     Enhance failover script generation and follow primary script
     generation so that they create better logging.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-4">
 <title>Release 4.4.4</title>
  <note>
   <title>Release Date</title>
   <simpara>2023-08-17</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-07-23 [2cbc61e]
    -->
    <para>
     Install system exit callback only after initialization of shared memory. (Muhammad Usama)
    </para>
    <para>
     When the on-exit callback gets called because of a failure to acquire
	 shared memory. The cleanup function can produce a segfault while accessing
	 process_info, that lives in shared memory.
	 Although we can also fix this by bailing out from the exit callback when
	 process_info is NULL but installing the function after successful initialization
	 of shared memory is a better approach as the rest of the system always assumes
	 the process_info can never be NULL, and also, there is nothing to
	 clean up before child processes are spawned.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-23 [379b24e]
    2023-07-22 [e59d034]
    -->
    <para>
     Disallowing setting the <xref linkend="guc-max-spare-children"> greater than <xref linkend="guc-num-init-children"> when <xref linkend="guc-process-management-mode"> is set to "dynamic". (Muhammad Usama)
    </para>
    <para>
     Config post-processing stage now throws an error if <varname>num_init_children</varname> is
	 smaller than <varname>max_spare_children</varname>.
	 Commit also adjusts the number of child processes spawned at startup based on
	 the configured process management strategy.
	 For the Aggressive strategy, <varname>max_spare_children</varname> number of processes is spawned;
	 for the other two strategies, <varname>min_spare_children</varname> number of children gets
	 created at startup.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-29 [13e73bc]
    -->
    <para>
     Downgrade log message. (Tatsuo Ishii)
    </para>
    <para>
     It is pointed out in <ulink url="https://www.pgpool.net/mantisbt/view.php?id=806">https://www.pgpool.net/mantisbt/view.php?id=806</ulink>
	 that there are log entries in the log file:
	</para>
	<para>
	 LOG: pool_pending_message_set_flush_request: msg: Parse
	</para>
	<para>
	 The messages were for debugging and the log level should have been a
	 DEBUG*. So I changed the log level from LOG to DEBUG5.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-12 [7ff642f]
    -->
    <para>
     Add schema qualification to some system catalog inquiry functions. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-08-09 [30db44e]
    -->
    <para>
     Fix coverity warning. (Tatsuo Ishii)
    </para>
    <para>
     Fix query cache module assigned time_t value to int32 variable. Change
     the variable type to int64. Per Coverity.  Also use difftime() to
     calculate time_t difference. This is a recommended practice.
     <ulink url="https://www.jpcert.or.jp/sc-rules/c-msc05-c.html">https://www.jpcert.or.jp/sc-rules/c-msc05-c.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-08-04 [1633f61]
    -->
    <para>
     Fix find_primary_node_repeatedly doesn't terminate within <xref linkend="guc-search-primary-node-timeout">. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-17 [cd03751]
    -->
    <para>
     Fix crash when v2 protocol is used.(<ulink url="https://www.pgpool.net/mantisbt/view.php?id=807">bug 807</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     When read_kind_from_backend() accumulates statistics data, it was not prepared for v2 protocol case.
    </para>
    <para>
	 Bug report and patch from MCanivez. Slightly modified by me.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-12 [1f5b7c8]
    -->
    <para>
     Fix <literal>PREPARE</literal> in multi-statement case. (Tatsuo Ishii)
    </para>
    <para>
     If multi-statement query includes <literal>PREPARE</literal> in the second or latter
	 position, and subsequent bind message uses the prepared statement, it
	 fails with "unable to bind" error because the prepared statement is not
	 saved in sent messages.
    </para>
    <para>
	 To fix this if such a case found after parsing the statement, create a
	 query context for the named statement and add it to the sent message list.
    </para>
    <para>
	 Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2023-July/008931.html">https://www.pgpool.net/pipermail/pgpool-general/2023-July/008931.html</ulink>
    </para>
    <para>
	 For this new regression test 079..multi_prepare is added.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-09 [e62c5a7]
    -->
    <para>
     Fix pgproto to work with bind message using params. (Tatsuo Ishii)
    </para>
    <para>
     Previously pgproto can only process bind messages without params.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-05 [5049e59]
    -->
    <para>
     Fix typo in log message. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-23 [571fbd9]
    -->
    <para>
     Fix missing CTE SEARCH and CYCLE rewrites. (Bo Peng)
    </para>
    <para>
     In native replication mode, <productname>Pgpool-II</productname> need to rewrite Date/Time functions to timestamp in WRITE queries.
	 CTE SEARCH and CYCLE rewrites were missing.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-19 [8e4bf20]
    -->
    <para>
     Removed duplicate pcp_listen_address setting in src/sample/pgpool.conf.sample-stream. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-14 [a091bcb]
    -->
    <para>
     Prevent query cache update under shared lock. (Tatsuo Ishii)
    </para>
    <para>
     In <ulink url="https://www.pgpool.net/mantisbt/view.php?id=795">bug 795</ulink> it was pointed out
	 that expired query cache entry can be modified under shared lock. This
	 could cause shared memory corruption used by query cache. In order to
	 fix this, we temporarily release the shared lock and then acquire an
	 exclusive lock before modifying the cache entry. This could create a
	 window and we need to get the cache entry meta data again to make sure
	 that the meta data has not been modified by someone else.
    </para>
    <para>
	 Back-patch to V4.4 stable where shared locking for query cache was introduced.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-05 [6aebf24]
    -->
    <para>
     Fix <xref linkend="guc-delay-threshold-by-time"> and <xref linkend="guc-prefer-lower-delay-standby">. (Tatsuo Ishii)
    </para>
	<para>
     They were broken since <varname>delay_threshold_by_time</varname> was introduced in 4.4.
	</para>
    <itemizedlist>
	 <listitem>
	  <para>
	   <varname>delay_threshold_by_time</varname> was not checked in where_to_send. This broke
	   load balancing when replication is delayed.
	  </para>
	 </listitem>
    </itemizedlist>
    <itemizedlist>
	 <listitem>
	  <para>
	   select_load_balancing_node was broken if both <varname>delay_threshold_by_time</varname>
       and <varname>prefer_lower_standby_delay</varname> were enabled.
	  </para>
	 </listitem>
    </itemizedlist>
	<para>
	 In order to fix the issue, where_to_send and
	 select_load_balancing_node are fixed. Also add test case for
	 <varname>delay_threshold_by_time</varname> are added to 033.prefer_lower_standby_delay.
    </para>
    <para>
	 Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2023-June/008864.html">https://www.pgpool.net/pipermail/pgpool-general/2023-June/008864.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-05-30 [f388140]
    -->
    <para>
     Fix the wrong variable names in replication_mode_recovery_2nd_stage.sample sample script. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-08-03 [5bf4ede]
    -->
    <para>
     Fix the missing "logger" application name. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-08-01 [65e2760]
    -->
    <para>
     Clarify the meaning of stop mode. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-26 [dda631f]
    -->
    <para>
     Remove the incorrect information from release note 4.2.10. (Bo Peng)
    </para>
    <para>
     Remove "Fix pgpool_recovery extension script. (Tatsuo Ishii)" from release note 4.2.10.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-07-11 [ddbcead]
    -->
    <para>
     Enhance SSH public key authentication setting section in "8.2. Pgpool-II + Watchdog Setup Example". (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-29 [fcac3fb]
    2023-06-28 [9adee42]
    -->
    <para>
     Fix load balance mode chapter. (Tatsuo Ishii)
    </para>
    <para>
     In some places "streaming replication mode" was written as "native
	 replication mode".  Also enhance description regarding additional
	 requirements for load balancing in the streaming replication mode.
	 Add some indexes.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-06-27 [fc0747a]
    -->
    <para>
     Enhance online recovery documentation. (Bo Peng)
    </para>
    <para>
     Mention that 2nd stage of online recovery does not work properly only for multiple pgpool nodes without watchdog enabled.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-05-22 [29f7861]
    -->
    <para>
     Fix occasional 069.memory_leak_extended test failure. (Tatsuo Ishii)
    </para>
    <para>
     It turned out that reason of the occasional test failure is, pgpool
	 child process is gone before running ps command after pgbench
	 finishes. The cause is a kind mismatch FATAL error, "DISCARD ALL
	 cannot be executed within a pipeline". To fix this, run pgbench in
	 background and get the process size before pgbench finishes.
    </para>
    <para>
	 Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-May/004338.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-May/004338.html</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-3">
 <title>Release 4.4.3</title>
  <note>
   <title>Release Date</title>
   <simpara>2023-05-18</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-03-25 [77f1e64]
    -->
    <para>
     Import <literal>psqlscan</literal> source code into <productname>Pgpool-II</productname> to judge multi statement query. (Tatsuo Ishii)
    </para>
    <para>
     <literal>Psqlscan</literal> is a module in the PostgreSQL source tree.
     It is essentially subset of <productname>PostgreSQL</productname> SQL scanner
     but it is specialized for detecting
     the end of each SQL statement. Therefore we can count the number of
     SQL statements in a query string by using it.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004291.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/04291.html</ulink>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-April/004320.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-April/004320.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-12 [5f912d3]
    2023-04-09 [7aca88c]
    -->
    <para>
     Allow to use multiple statements extensively. (Tatsuo Ishii)
    </para>
    <para>
     This commit tries to eliminate pgpool's long standing limitations
     regarding multiple statements (multi-statements).
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004287.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004287.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-16 [ad4d966]
    2023-03-30 [8ce860d]
    2023-03-28 [722d4bd]
    -->
    <para>
     Use schema qualification for internal queries. (Tatsuo Ishii)
    </para>
    <para>
     Some of objects such as function and cast did not use "pg_catalog."
     schema qualification. This does not lead to immediate security
     concern but using the schema qualification is always good practice.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-04-30 [eeea973]
    -->
    <para>
     Fix <xref linkend="guc-prefer-lower-delay-standby"> bug.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=798">bug 798</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     When client connects to pgpool, one of standbys are chosen as the load
     balancing node. If standby delay exceeds delay_threshold while the
     session continues, <varname>prefer_lower_delay_standby</varname> will choose
     the least delay standby node as the new load balancing node and set the target
     backend to the node. Unfortunately the decision was made before the
     checking that SELECT query includes writing function etc.,
     <productname>Pgpool-II</productname>
     happily sends SELECT  which cannot be executed on standby. To fix
     this, <varname>prefer_lower_delay_standby</varname> treatment is moved
     after the writing function etc. check.
    </para>
    <para>
     Also modify 033.prefer_lower_standby_delay regression test to include the case above.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-03-22 [1618f0f]
    -->
    <para>
     Fix compile error on systems using musl libc.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=790">bug 790</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     Patch provided by leimaohui.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-05 [33655c3]
    -->
    <para>
     Fix multiple query cache bug. (Tatsuo Ishii)
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-January/004259.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-January/004259.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-05 [95ab912]
    -->
    <para>
     Fix sr worker to not send wrong query to standby server in corner case. (Tatsuo Ishii)
    </para>
    <para>
     When ALWAYS_PRIMARY flag is set, PRIMARY_NODE_ID macro returns node
     id, rather than -1 even if the primary is down.
     In this case streaming replication delay check worker
     sends <literal>SELECT pg_current_wal_lsn()</literal> or
     <literal>SELECT pg_current_xlog_location()</literal>
     depending on <productname>PostgreSQL</productname>'s version to
     standby which of course raises an error.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004279.html">https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004279.html</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-31 [38225a7]
    -->
    <para>
     Fix kind mismatch error with <literal>DEALLOCATE</literal>.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=780">bug 780</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     Kind mismatch error occurs when conditions below are all met:
     <itemizedlist>
      <listitem>
       <para>
        streaming replication mode
       </para>
      </listitem>
     </itemizedlist>
     <itemizedlist>
      <listitem>
       <para>
        load balance node is other than primary
       </para>
      </listitem>
     </itemizedlist>
     <itemizedlist>
      <listitem>
       <para>
        <literal>PREPARE</literal> is used in a multi-statement query
       </para>
      </listitem>
     </itemizedlist>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-25 [1c623f7]
    -->
    <para>
     Fix compile error of regression test (Takuma Hoshiai)
    </para>
    <para>
     The error occurred by timestamp test using gcc10.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-30 [93f5585]
    -->
    <para>
     Obtain stronger lock while committing shared relcache. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-18 [1f503e1]
    -->
    <para>
     Fix that <literal>show pool_version</literal> shows row description twice. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-04-25 [171a57c]
    -->
    <para>
     Add explanation for <xref linkend="guc-wd-priority">. (Chen Ningwei)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-19 [a57cc11]
    -->
    <para>
     Add restriction regarding <literal>PREPARE/EXECUTE/DEALLOCATE</literal>. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-19 [a9b4f30]
    -->
    <para>
     Add caution to use <literal>-D</literal> option with pgpool. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-14 [7a540cc]
    -->
    <para>
     Enhancing "Installation from RPM" section. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-13 [bbe5236]
    -->
    <para>
     Add "Backing up PostgreSQL database" section to "Server Setup and Operation" chapter. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-13 [eb338ff]
    -->
    <para>
     Remove the configuration of "-D" start OPTS from "8.2. Pgpool-II + Watchdog Setup Example". (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-09 [336f50f]
    -->
    <para>
     Fix restrictions section. (Tatsuo Ishii)
    </para>
    <para>
     <itemizedlist>
      <listitem>
       <para>
        Add mention about <literal>SCRAM-SHA-256</literal> authentication
       </para>
      </listitem>
     </itemizedlist>
     <itemizedlist>
      <listitem>
       <para>
        Add mention about snapshot isolation mode
       </para>
      </listitem>
     </itemizedlist>
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-04 [33c6313]
    2023-04-03 [75e8870]
    -->
    <para>
     Add explanation when pg node status is shown as "unknown". (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-03-22 [366e8e6]
    -->
    <para>
     Mention that the target node to promote must be up and running when executing
     <xref linkend="pcp-promote-node">. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-22 [85994ce]
    -->
    <para>
     Mention that AES256 support requires <option>--with-openssl</option> option. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-21 [e813ed6]
    -->
    <para>
     Explicitly stat that it is -w option of pcp command is needed to use .pcppass. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-15 [6bf97fd]
    -->
    <para>
     Fix "2.8 Creating insert lock table" section. (Tatsuo Ishii)
    </para>
    <para>
     It only referred to the native replication where it should have referred
     to the snapshot isolation mode.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-02-01 [6d39a7e]
    -->
    <para>
     Enhance <xref linkend="sql-show-pool-cache">. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Test Tools</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-03-28 [89b5129]
    -->
    <para>
     Change <command>pgpool_setup</command> to append some parameters to the end of the configuration file. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>
   <listitem>
    <!--
    2023-01-28 [baedc51]
    -->
    <para>
     Refactor 071.execute_and_deallocate/test.sh. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-05-12 [8c3250e]
    2023-04-29 [2376ab7]
    2023-04-16 [c9e45b6]
    2023-04-15 [1e25fd2]
    -->
    <para>
     Enhance regression tests. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-04-06 [89c0159]
    -->
    <para>
     Fix occasional 005.jdbc test failure. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-2">
 <title>Release 4.4.2</title>
  <note>
   <title>Release Date</title>
   <simpara>2023-01-23</simpara>
  </note>

 <sect2>
  <title>Overview</title>
  <para>
   This release contains a security fix.
  </para>
  <para>
   If following conditions are all met, the password of <xref linkend="guc-wd-lifecheck-user"> is
   exposed by <xref linkend="SQL-SHOW-POOL-STATUS"> command.
   The command can be executed by any user who can
   connect to <productname>Pgpool-II</productname>. (CVE-2023-22332)
  </para>

  <itemizedlist>
   <listitem>
    <para>
     Version 3.3 or later.
    </para>
   </listitem>

   <listitem>
    <para>
     <xref linkend="guc-use-watchdog"> is <literal>on</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
     <xref linkend="guc-wd-lifecheck-method"> is <literal>query</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
     A plain text password is set
     to <xref linkend="guc-wd-lifecheck-password">.
    </para>
   </listitem>
  </itemizedlist>

  <para>
   In this case it is strongly recommended to upgrade to this version
   (we do not expose <xref linkend="guc-wd-lifecheck-password"> in
   show pool_status command any more), or use one of following
   workarounds.
  </para>

  <para>
   Workarounds for 4.0.x to 4.4.x users:
  </para>

  <itemizedlist>
   <listitem>
    <para>
    Disable watchdog. Set <xref linkend="guc-use-watchdog">
    to <literal>off</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
    Change <xref linkend="guc-wd-lifecheck-method">
    to <literal>heartbeat</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
    Set an empty string
    to <xref linkend="guc-wd-lifecheck-password">. This will use
    password in the <filename>pool_passwd</filename> file.
    </para>
   </listitem>

   <listitem>
    <para>
    Set an AES encrypted password
    to <xref linkend="guc-wd-lifecheck-password">.
    </para>
   </listitem>
  </itemizedlist>

  <para>
   In any case we recommend to
   change <xref linkend="guc-wd-lifecheck-password">
   in <productname>PostgreSQL</productname>.
  </para>

  <para>
   Workarounds for 3.0.x to 3.7.x users:
  </para>

  <itemizedlist>
   <listitem>
    <para>
    Disable watchdog. Set <xref linkend="guc-use-watchdog">
    to <literal>off</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
     Change <xref linkend="guc-wd-lifecheck-method">
     to <literal>heartbeat</literal>.
    </para>
   </listitem>
  </itemizedlist>

  <para>
   In any case we recommend to
   change <xref linkend="guc-wd-lifecheck-password">
   in <productname>PostgreSQL</productname>.
  </para>

  <para>
   Please note that <productname>Pgpool-II</productname> 3.7.x or
   before are end of life and no minor updates are provided for those
   versions.
  </para>
 </sect2>

 <sect2>
  <title>Changes</title>
  <itemizedlist>

   <listitem>
    <!--
    2023-01-21 [123ceb46]
      -->
    <para>
     Do not expose <xref linkend="guc-wd-lifecheck-password"> in
     <xref linkend="SQL-SHOW-POOL-STATUS">,
     <xref linkend="PCP-POOL-STATUS"> and
     <xref linkend="PGPOOL-ADM-PCP-POOL-STATUS"> commands. (CVE-2023-22332) (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-21 [4e0cb44b]
      -->
    <para>
     Change the default value
     for <xref linkend="guc-wd-lifecheck-password"> to empty string as
     documented. (Bo Peng)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>

   <listitem>
    <!--
	2023-01-16 [65865834]
      -->
    <para>
     Fixed pgpool_adm: pcp_pool_status error when this function is used with <productname>PostgreSQL</productname> 15. (Tatsuo Ishii)
    </para>
    <para>
     pcp_pool_status actually returns SETOF record, but it was declared as
     "returns record". This sloppiness had been tolerated until
     <productname>PostgreSQL</productname> 14 but <productname>PostgreSQL</productname> 15
     becomes more strict. To fix this we need to change the return type of
     pcp_pool_status from "RETURNS record" to "RETURNS SETOF record".
    </para>
    <para>
     And the pgpool_adm extension version is bumped to 1.5.
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-13 [ac752fd6]
      -->
    <para>
     Fix integer overflow in streaming replication check. (Tatsuo Ishii)
    </para>
    <para>
     When <xref linkend="guc-delay-threshold-by-time"> is enabled and
     the replication delay is about more than 36 minutes, an integer
     overflow error was logged and replication check failed.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-24 [b31e6c94]
      -->
    <para>
     Fix compiler warning
     in <filename>pgpool-regclass.c</filename>. (Florian Weimer,
     Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-10 [b8698f5f]
      -->
    <para>
     Fix Uninitialized variables pointed out by Coverity. (Takuma Hoshiai)
    </para>
    </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>

   <listitem>
    <!--
    2023-01-06 [2d002b7d]
      -->
    <para>
     Doc: Enhance and fix some mistakes
     in <link linkend="runtime-in-memory-query-cache-shmem-config">Configurations
     to use shared memory</link> chapter. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2023-01-03 [1a259a28]
      -->
    <para>
     Doc: Enhance explanation
     of <xref linkend="guc-delay-threshold-by-time">. (zam bak, Tatsuo
     Ishii)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-1">
 <title>Release 4.4.1</title>
  <note>
   <title>Release Date</title>
   <simpara>2022-12-22</simpara>
  </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2022-12-16 [6311565]
    -->
    <para>
     Downgrade streaming replication LOG message "standby_delay: 54" to DEBUG1. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-12 [dfcc21e]
    -->
    <para>
     Downgrade LOG messages "we have hit the ceiling" to DEBUG5. (Tatsuo Ishii)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>

   <listitem>
    <!--
    2022-12-20 [f6cbfe2]
    -->
    <para>
     Fix time stamp rewrite bug. (Tatsuo Ishii)
    </para>
    <para>
     In <productname>Pgpool-II</productname> 4.4 outfuncs module, boolean constant was ignored and turned into
     an empty string in the rewritten query string, which caused syntax errors.
    </para>
    <para>
     This issue is reported by Michiel van Leening.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2022-December/008581.html">[pgpool-general: 8521]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-20 [7bc3176]
    -->
    <para>
     Fix issue with <xref linkend="guc-failover-require-consensus">. (Muhammad Usama)
    </para>
    <para>
     The fix is to dynamically set the failover command timeout based on the maximum
     value of health check parameters across the watchdog cluster.
    </para>
    <para>
     Reviewed and tested by Tatsuo Ishii.
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2022-November/004228.html">[pgpool-hackers: 4227]</ulink>
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documents</title>
  <itemizedlist>

   <listitem>
    <!--
    2022-12-19 [8e5f5eb]
    -->
    <para>
     Doc: enhance the performance section. (Tatsuo Ishii)
    </para>
    <para>
     Mention about dynamic process management.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-14 [5d5d4a2]
    -->
    <para>
     Doc: fix typo in Aurora example. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-12 [83dcd83]
    -->
    <para>
     Doc: enhance dynamic process management document. (Tatsuo Ishii)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Regression Tests</title>
  <itemizedlist>

   <listitem>
    <!--
    2022-12-17 [2985853]
    -->
    <para>
     Allow to define PGPOOLDIR using environment variable.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=766">bug 766</ulink>) (Bo Peng)
    </para>
   </listitem>

  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-4-4-0">
 <title>Release 4.4.0</title>
 <note>
  <title>Release Date</title>
  <simpara>2022-12-06</simpara>
 </note>

 <sect2>
  <title>Overview</title>
  <para>
   Many enhancements are added to this version for easier
   configuration and administration. New dynamic spare process management mode is added.
   Streaming replication delay can be controlled by time, rather than WAL
   bytes. <productname>Pgpool-II</productname> and PCP's listen
   addresses accept multiple addresses. Full configuration of Unix
   socket directory is now possible.
   Allow to customize the command used by <varname>trusted_servers</varname> for checking upstream connection.
   New <productname>PostgreSQL</productname> 15 <literal>SQL</literal>
   parser is imported. Performance is also improved in query cache.
  </para>

  <para>
   Major enhancements are as follows:
  </para>

  <itemizedlist>
   <listitem>
    <para>
     Add new dynamic spare process management feature.
     This feature allows selecting between static and dynamic process management modes.
    </para>
   </listitem>

   <listitem>
    <para>
     Allow to specify replication delay by time in streaming
     replication mode. For this purpose new
     parameter <xref linkend="guc-delay-threshold-by-time"> is
     introduced.
    </para>
   </listitem>

   <listitem>
    <para>
     As <productname>PostgreSQL</productname> already
     does, <productname>Pgpool-II</productname> now supports
     <xref linkend="guc-unix-socket-directories">, <xref linkend="guc-unix-socket-group">
     and <xref linkend="guc-unix-socket-permissions"> for more
     flexible and precise control of UNIX domain sockets.
    </para>
   </listitem>

   <listitem>
    <para>
     Allow to use comma separated multiple listen addresses in
     <xref linkend="guc-listen-addresses">
     and <xref linkend="guc-pcp-listen-addresses">. They control
     which interfaces accept connection attempts, which can help
     prevent repeated malicious connection requests on insecure
     network interfaces.
    </para>
   </listitem>

   <listitem>
    <para>
     Allow to customize the command used by <xref linkend="guc-trusted-servers"> for checking upstream connection.
     For this purpose new parameter <xref linkend="guc-trusted-server-command"> is introduced.
    </para>
   </listitem>

   <listitem>
    <para>
     Import PostgreSQL 15's SQL parser.
    </para>
   </listitem>

   <listitem>
    <para>
     Speed up <link linkend="runtime-in-memory-query-cache">query
     cache</link> by reducing lock contention. This allows concurrent
     running clients to fetch cache contents much more quicker.
    </para>
   </listitem>
  </itemizedlist>

 </sect2>

 <sect2 id="migration-4-4-0">
  <title>Migration to Version 4.4</title>
  <itemizedlist>

   <listitem>
    <para>
     Rename configuration parameter <varname>socket_dir</varname> to <xref linkend="guc-unix-socket-directories">.
    </para>
   </listitem>

   <listitem>
    <para>
     Configuration parameter <literal>delegate_IP</literal> is renamed
     to <xref linkend="guc-delegate-ip">.  For compatibility with the
     old versions, the old parameter delegate_IP can still work.  If
     the old parameter delegate_IP is
     used, <productname>Pgpool-II</productname> will set the value to
     delegate_ip and throw a warning message.
    </para>
   </listitem>

   <listitem>
    <para>
     Parameter status messages from backend are now forwarded to
     frontend.  When a parameter status message arrives from
     backend, <productname>Pgpool-II</productname> memorized it but
     did not forward to frontend.  Now they are forwarded to frontend.
     Applications using <productname>Pgpool-II</productname> should be
     prepared to accept the message.  But
     since <productname>PostgreSQL</productname> already sends
     parameter status messages to frontend whenever they are
     generated, those application that are working
     with <productname>PostgreSQL</productname> should have no problem
     with this change.
    </para>
   </listitem>

  </itemizedlist>
 </sect2>

 <sect2>
  <title>Changes</title>
  <itemizedlist>

   <listitem>
    <!--
	2022-11-09 [ce5e529c]
      -->
    <para>
     Add new dynamic spare process management feature. (Jianshen Zhou, Muhammad Usama)
    </para>
    <para>
     This feature allows selecting between static and dynamic process management modes.
     Static process management is the same as the existing behavior of <productname>Pgpool-II</productname>,
     where it spawns all child processes at startup. The new Dynamic mode keeps track of idle
     processes and forks or kills processes to keep this number within
     the specified boundaries.
    </para>
    <para>
     Four new settings, <xref linkend="guc-process-management-mode">,
     <xref linkend="guc-process-management-strategy">,
     <xref linkend="guc-min-spare-children">, and <xref linkend="guc-max-spare-children">
     are added to configure the process management behavior, while <varname>process_management_strategy</varname>
     allows selecting between three possible scaling-down strategies.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-01-28 [832212b2]
    2022-01-29 [515860f3]
    -->
    <para>
     Allow to specify replication delay by time. (Tatsuo Ishii)
    </para>
    <para>
     <xref linkend="guc-delay-threshold"> specifies replication delay
     upper limit in bytes. Add similar parameter called
     <xref linkend="guc-delay-threshold-by-time"> so that the limit
     can be specified by time (seconds). The new parameter is
     effective if it is greater than 0.
     In this case <xref linkend="SQL-SHOW-POOL-NODES"> and
     <xref linkend="pcp-node-info"> display the replication delay in seconds.
     If the parameter is set to 0, <xref linkend="guc-delay-threshold-by-time">
     is ignored and falls back to delay_threshold mode.
    </para>
    <para>
     For this purpose new member standby_delay_by_time is added to shared
     memory data Backendinfo to distinguish whether replication delay is
     measured in bytes (standby_delay_by_time = false) or seconds
     (standby_delay_by_time = true). If standby_delay_by_time is true,
     standby_delay is measured in second * 1000000, so that the precision
     is 6 digits after decimal point.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-07-20 [bc03514b]
    -->
    <para>
     Support for unix_socket_directories and related parameters. (Masaya Kawamoto)
    </para>
    <para>
     Rename configuration parameter <varname>socket_dir</varname> to <xref linkend="guc-unix-socket-directories">,
     and add new configuration parameters <xref linkend="guc-unix-socket-group"> and <xref linkend="guc-unix-socket-permissions">.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-11-04 [b7bcf0d7]
    -->
    <para>
     Add <xref linkend="guc-trusted-server-command"> configuration parameter. (Takuma Hoshiai)
    </para>
    <para>
     This feature is able to specify a command that is used by
     <xref linkend="guc-trusted-servers"> for checking up stream connection.
     Previously, ping command was only used, and it was hard coded.
    </para>
    <para>
     Default is 'ping -q -c3 %h' which means same as before.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-02-23 [fd0efcea]
    2022-03-05 [9f727c1e]
    -->
    <para>
     Implement comma separated multiple listen addresses. (Tatsuo Ishii)
    </para>
    <para>
     Previously <productname>Pgpool-II</productname> only allowed to
     set single hostname, IP or '*' to
     the <xref linkend="guc-listen-addresses"> parameter. Now we can
     set multiple listen addresses to the parameter
     as <productname>PostgreSQL</productname> already does.
    </para>
    <para>
     Also <xref linkend="guc-pcp-listen-addresses"> now accepts comma
     separated multiple listen addresses.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-09-22 [424e68c1]
    -->
    <para>
     Import PostgreSQL 15's SQL parser.(Bo Peng, Tatsuo Ishii)
    </para>
    <para>
     Major changes of PostgreSQL 15 parser include:
    </para>
    <itemizedlist>

     <listitem>
      <para>
       Add new SQL MERGE command
      </para>
      <programlisting>
MERGE INTO ... USING ...
      </programlisting>
     </listitem>

     <listitem>
      <para>
       Add new option HEADER MATCH to COPY FROM
      </para>
      <programlisting>
COPY ... FROM stdin WITH (HEADER MATCH);
      </programlisting>
     </listitem>

     <listitem>
      <para>
       Allow foreign key ON DELETE SET actions
      </para>
      <programlisting>
CREATE TABLE t1 (
...
FOREIGN KEY (c1, c2) REFERENCES t2 ON DELETE SET NULL (c2)
);
      </programlisting>
     </listitem>

     <listitem>
      <para>
       Allow SET ACCESS METHOD in ALTER TABLE
      </para>
      <programlisting>
ALTER TABLE ... SET ACCESS METHOD ...;
      </programlisting>
     </listitem>

    </itemizedlist>
   </listitem>

   <listitem>
    <!--
    2022-09-19 [dc559c07]
    -->
    <para>
     Replace exclusive locking with shared locking in query cache. (Tatsuo Ishii)
    </para>
    <para>
     Previously the query cache module used semaphore to protect critical
     region in the query cache module. However this had serious down side
     because the locking using semaphore is exclusive lock. This
     introduces unnecessary wait for cache reading clients and performance
     degradation when there are many concurrent clients.
    </para>
    <para>
     To overcome the issue replace locking implementation
     with <function>flock(2)</function> which allows shared
     locking. Now the cache reading clients do not need to fight each
     other to obtain a lock thus this increases concurrency.
    </para>
    <para>
     For this purpose pgpool main process creates a dummy file as
     <filename>logdir/memq_lock_file</filename> and opens it. The file
     descriptor is inherited by all child process so that they can
     issue <function>flock(2)</function> on the file.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-02-10 [7ec74730]
    -->
    <para>
     Add validations of <xref linkend="guc-wd-lifecheck-password">
     and <xref linkend="guc-recovery-password"> format. (Masaya Kawamoto)
    </para>
   </listitem>

   <listitem>
    <!--
    2022-01-31 [4bcba525]
    -->
    <para>
     Enhance parameter status handling. (Tatsuo Ishii)
    </para>
    <para>
     When a parameter status message arrives from backend, Pgpool-II
     memorized it but did not forward to frontend.  This commit allows
     forwarding a parameter status message to frontend.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-01-29 [515860f3]
    -->
    <para>
     Change the way to obtain replication delay when
     <xref linkend="guc-delay-threshold-by-time"> is
     specified. (Tatsuo Ishii)
    </para>
    <para>
     Use pg_stat_replication.replay_lag.  This way makes the code much
     simpler and more precise replication delay can be obtained. The only
     downside is pg_stat_replication.replay_lag is only available in
     PostgreSQL 10 or later (previous method can be used in 9.5 or later).
    </para>
   </listitem>

   <listitem>
    <!--
	2022-01-18 [f9521fe4]
      -->
    <para>
     Implement flush tracking feature. (Tatsuo Ishii)
    </para>
    <para>
     When a flush message arrives from frontend, any pending message from
     backend should be flushed and sent to frontend. In order to do that,
     this commit implements "flush tracking" feature. i.e. when a flush
     message arrives, pgpool sets "flush pending" flag in each pending
     messages. If the response message from backend corresponds to the
     pending message with the flush pending flag being set, the message is
     immediately flushed to frontend, rather than buffered.
    </para>
   </listitem>

   <listitem>
    <!--
    2022-01-18 [d9e4bef8]
    2022-01-12 [a14fe59a]
    -->
    <para>
     Enhance pgproto. (Tatsuo Ishii)
    </para>
    <para>
     Allow to show ParameterStatus's parameter name and value.
    </para>
    <para>
     Add new command 'z'. This is similar to 'y' except 'z' reads only 1
     message and do not wait for "ready for query" arrives (or timeout if
     no message arrives within 1 second).
    </para>
   </listitem>

   <listitem>
    <!--
    2022-12-03 [0b31fdc3]
    -->
    <para>
     Downgrade LOG message "new IPC connection received" to DEBUG1.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=775">bug 775</ulink>) (Bo Peng)
    </para>
    <para>
     This message is output periodically and should not be logged as LOG.
     Patch is created by pstef and reviewed by Bo Peng.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <para>
     In this release same bug fixes as <productname>Pgpool-II</productname> 4.3.4 are
     already applied. See <xref linkend="release-4-3-4"> for more details of those fixes.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Documentation changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2022-10-27 [89d1235]
    -->
    <para>
     Doc: Update documentation of AWS configuration example and add sample scripts for AWS. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

</sect1>
