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

<sect1 id=release-3-4-26> 
 <title>Release 3.4.26</title>
 <note>
  <title>Release Date</title>
  <simpara>2019-10-31</simpara>
 </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-10-25 [45a3469]
    -->
    <para>
     Fix incorrect query rewrite in replication mode. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-10-10 [4b726df]
    -->
    <para>
 	 Fix assorted ancient v2 protocol bugs. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-10-08 [45ac39b]
    -->
    <para>
	 Fix problem that <xref linkend="guc-syslog-facility"> doesn't change by reload. 
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=548">bug 548</ulink>) (Takuma Hoshiai)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-10-03 [fed3d6b]
    -->
    <para>
     Fix Pgpool-II shutdown failed in certain case. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-09-15 [a333a45]
    -->
    <para>
     Fix segfault when executing an erroneous query after DEALLOCATE a named statement.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=546">bug 546</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id=release-3-4-25> 
 <title>Release 3.4.25</title>
 <note>
  <title>Release Date</title>
  <simpara>2019-08-15</simpara>
 </note>

 <sect2>
  <title>Enhancements</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-08-08 [94b0ce1]
    -->
    <para>
     Import some of memory manager debug facilities from <productname>PostgreSQL</productname>. (Tatsuo Ishii)
    </para>
   </listitem>
   <listitem>
    <!--
    2019-07-24 [d3493f7]
    -->
    <para>
     Use <function>pg_get_expr()</function> instead of <literal>pg_attrdef.adsrc</literal> to support for <productname>PostgreSQL</productname> 12. (Bo Peng)
    </para>
   </listitem>
   <listitem>
    <!--
    2019-08-11 [c553e51]
    2019-08-08 [94364ad]
    2019-07-17 [5730d28]
    2019-07-02 [b364caa]
    -->
    <para>
     Enhance shutdown script of <xref linkend="PGPOOL-SETUP">. (Tatsuo Ishii)
      <itemizedlist> 
       <listitem>
	<para>
	 Make shutdownall to wait for completion of shutdown of <productname>Pgpool-II</productname>.
	</para>
       </listitem>
       <listitem>
	<para>
	 If environment variable <varname>CHECK_TIME_WAIT</varname> is set to true, use <command>netstat</command> command to confirm usage of the <literal>TCP/IP</literal> port while executing shutdown script.
	</para>
       </listitem>
      </itemizedlist> 
    </para>
   </listitem>
   <listitem>
    <!--
    2019-05-22 [57cd1d4]
    -->
    <para>
     Deal <literal>pgpool_adm</literal> extension with <productname>PostgreSQL</productname> 12. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-07-28 [fbe8fdc]
    -->
    <para>
     Fix <xref linkend="PGPOOL-SETUP"> to produce correct follow master command. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-07-07 [44f8e2d]
    -->
    <para>
     Fix query cache module so that it checks oid array's bound. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-07-07 [ae45e93]
    -->
    <para>
     Fix off-by-one error in query cache module. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-06-24 [057a635]
    -->
    <para>
     Fix segfault when <literal>samenet</literal> is specified in <filename>pool_hba.conf</filename>. (Tatsuo Ishii)
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2019-June/006659.html">[pgpool-general: 6601]</ulink>.
    </para>
   </listitem>

   <listitem>
    <!--
    2019-06-07 [9d7c5ba]
    -->
    <para>
     Fix to deal with backslashes according to the config of <varname>standard_conforming_strings</varname> in native replication mode.
     (<ulink url="https://www.pgpool.net/mantisbt/view.php?id=467">bug 467</ulink>) (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-08-14 [0d6fdbc]
    2019-05-23 [0e8c1c2]
    2019-05-22 [c264275]
    2019-05-22 [53e7af0]
    2019-05-22 [19cfda2]
    -->
    <para>
     Fix memory leaks. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id=release-3-4-24> 
 <title>Release 3.4.24</title>
 <note>
  <title>Release Date</title>
  <simpara>2019-05-16</simpara>
 </note>

 <sect2>
  <title>Enhancements</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-05-03 [afbcff2]
    -->
    <para>
     Speed up failover when all of backends are down. (Tatsuo Ishii)
    </para>
    <para>
     If all of the backend are in down status, immediately give up finding 
     primary node regardless search_primary_node_timeout and promptly 
     finish the failover process.
    </para>
    <para>
     Discussion: <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2019-May/003321.html">[pgpool-hackers: 3321]</ulink>
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-30 [87e531e]
    2019-04-30 [3cad617]
    -->
    <para>
     pgpool-recovery extension and <command>pgpool_setup</> is now ready for the next major release <productname>PostgreSQL</> 12. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-05-09 [2b2f525]
    -->
    <para>
     Fix the wrong error message "ERROR: connection cache is full", when all backend nodes are down. 
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=487">bug 487</>) (Bo Peng)
    </para>
    <para>
     When all backend nodes are down, <productname>Pgpool-II</> throws an incorrect
     error message "ERROR: connection cache is full". Change the error
     message to "all backend nodes are down, pgpool requires at least one valid node".
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-21 [b58aef8]
    -->
    <para>
     Avoid exit/fork storm of pool_worker_child process. (Tatsuo Ishii)
    </para>
    <para>
     pool_worker_child issues query to get WAL position using <function>do_query()</>,
     which could throws FATAL error. In this case pool_worker_child process
     exits and <productname>Pgpool-II</> parent immediately forks new process. This cycle
     indefinitely repeats and gives high load to the system.
     To avoid the exit/fork storm, sleep <varname>sr_check_period</>.
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-18 [233673c]
    -->
    <para>
     Fix <xref linkend="GUC-write-function-list">'s broken default value. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-17 [90b5f44]
    -->
    <para>
     Fix "not enough space in buffer" error. 
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=499">bug 499</>) (Tatsuo Ishii)
    </para>
    <para>
     The error occurred while processing error message returned from
     backend and the cause is that the query string in question is too
     big. Problem is, the buffer is in fixed size (8192 bytes).
     Eliminate the fixed size buffer and use palloced buffer
     instead. This also saves some memory copy work.
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-16 [586b012]
    -->
    <para>
     Fix DROP DATABASE failure. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-04-10 [2f849b6]
    -->
    <para>
     Fix wrong variable in <function>read_status_file()</> function.
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=493">bug 493</>) (Takuma Hoshiai)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-03-30 [5441f49]
    -->
    <para>
     Fix compiler warnings. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id=release-3-4-23> 
 <title>Release 3.4.23</title>
 <note>
  <title>Release Date</title>
  <simpara>2019-03-29</simpara>
 </note>

 <sect2>
  <title>Enhancements</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-03-27 [b950824]
    -->
    <para>
     Add new configuration option <xref linkend="guc-ssl-prefer-server-ciphers">. (Muhammad Usama)
    </para>
    <para>
     Add the new setting <xref linkend="guc-ssl-prefer-server-ciphers"> to let users configure if they
      want client's or server's cipher order to take preference.
    </para>
    <para>
     The default for this parameter is off, which prioritize the client's
     cipher order as usual. However this is just for keeping backward
     compatibility, and it is possible that a malicious client uses weak
     ciphers. For this reason we recommend to set this parameter to on at
     all times.
    </para>
   </listitem>

   <listitem>
    <!--
    2019-03-23 [3f8d1f0]
    -->
    <para>
     Allow to set a client cipher list. (Tatsuo Ishii)
    </para>
    <para>
     For this purpose new parameter <xref linkend="guc-ssl-ciphers">, which specifies the cipher
      list to be accepted by <productname>Pgpool-II</>, is added.
      This is already implemented in <productname>PostgreSQL</> and useful to enhance security when SSL is enabled. 
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2019-03-18 [b92e048]
    -->
    <para>
     Fix unnecessary <function>fsync()</> to <filename>pgpool_status</> file. (Tatsuo Ishii)
    </para>
    <para>
     Whenever new connections are created to PostgreSQL backend, <function>fsync()</>
     was issued to <filename>pgpool_status</> file, which could generate excessive I/O
     in certain conditions.
     So reduce the chance of issuing <function>fsync()</> so that it is issued only when
     backend status is changed.
    </para>
    <para>
     Discussion: <ulink url="http://www.sraoss.jp/pipermail/pgpool-general/2019-February/006494.html">[pgpool-general: 6436]</ulink>
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id=release-3-4-22> 
 <title>Release 3.4.22</title>
 <note>
  <title>Release Date</title>
  <simpara>2019-02-21</simpara>
 </note>

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

   <listitem>
    <!--
    2019-02-15 [fee0584]
    -->
    <para>
     Doc: Fix configuration change timing regarding <xref linkend="GUC-MEMORY-CACHE-ENABLED">. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-02-12 [8bf96bf]
    -->
    <para>
     Fix online recovery failed due to <xref linkend="GUC-CLIENT-IDLE-LIMIT-IN-RECOVERY"> in certain cases. 
      (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=431">bug 431</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-01-29 [8a94657]
    -->
    <para>
     Fix corner case bug when <function>strip_quote()</function> handle a empty query string. <ulink url="http://www.pgpool.net/mantisbt/view.php?id=458">(bug 458</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2019-01-10 [fc47d5f]
    -->
    <para>
     Fix Pgpool child segfault if failover occurs when trying to establish a connection. (Tatsuo Ishii)
    </para>
    <para>
     See <ulink url="https://www.pgpool.net/pipermail/pgpool-hackers/2019-January/003214.html">[pgpool-hackers: 3214]</ulink> for discussion.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-12-06 [21d6ae8]
    -->
    <para>
     Fix <productname>Pgpool-II</productname> hang when <varname>idle_in_transaction_session_timeout = on</varname>. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=448">bug 448</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id=release-3-4-21> 
 <title>Release 3.4.21</title>
 <note>
  <title>Release Date</title>
  <simpara>2018-11-22</simpara>
 </note>

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

   <listitem>
    <!--
    2018-11-21 [8be3528]
    -->
    
    <para>
     Fix to sort startup packet's parameters sent by client. 
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=444">bug 444</ulink>)(Takuma Hoshiai)
    </para>
    <para>
     If order of startup packet's parameters differ between cached connection
     pools and connection request, didn't use connection pool ,and created new
     connection pool.
    </para>
   </listitem>
   
   <listitem>
    <!--
    2018-11-13 [8d445dd]
    -->
    
    <para>
     Fix segmentation fault occurs when a certain Bind message is sent in native replication mode. 
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=443">bug 443</ulink>)(Bo Peng)
    </para>
    <para>
     If the number of parameter format codes is specified to one, but the number
     of the original query's parameter is zero, <function>bind_rewrite_timestamp()</>
     will call <function>memcpy</> with a negative value. 
     This causes segmentation fault.
    </para>
    <para>
     Patch is provided by Yugo Nagata.
    </para>
   </listitem>
   
   <listitem>
    <!--
    2018-11-08 [6d17384]
    -->
    
    <para>
     Fix a query passed to relcache so that it uses schema qualified table name. (Tatsuo Ishii)
    </para>
   </listitem>
   
   <listitem>
    <!--
    2018-11-05 [ca3466a]
    -->
    
    <para>
     Fix query cache invalidation bug. (Tatsuo Ishii)
    </para>
   </listitem>
   
   <listitem>
    <!--
    2018-11-01 [ca3dc43]
    -->
    <para>
     Fix memory leak in extended query + query cache enabled. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-20">
 <title>Release 3.4.20</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-10-31</simpara>
 </note>

 <sect2>
  <title>Changes</title>
  <itemizedlist>
   <listitem>
    <!--
    2018-10-18 [8cc799a]
    -->
    <para>
     Change <filename>pgpool.spec</filename> file to install extension to DB server which supports LLVM JIT. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-29 [b8d4b6c]
    -->
    <para>
     Test: Add regression test for SSL connection. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-10 [6c48e90]
    -->
    <para>
     Test: Add definition of PGLIB in <filename>regress.sh</filename>. (Bo Peng)
    </para>
    <para>
     Patch provided by Jesper Pedersen.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2018-10-25 [6f8507e]
    -->
    <para>
     Fix typo in <varname>child_max_connections</varname> description of <command>SHOW POOL_STATUS</command> output. (Tatsuo Ishii)
    </para>
    <para>
     Patch provided by Phil Ramirez.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-10-22 [73478a4]
    -->
    <para>
     Fix segmentation fault when error query and Sync message are sent in native replication mode. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=434">bug 434</ulink>) (Takuma Hoshiai)
    </para>
    <para>
     In native replication mode, segmentation fault occurs when Sync messages is sent just after a query error.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-10-18 [103ac89]
    -->
    <para>
     Fix syntax error when queries including time functions and 
     <literal>IN (SELECT ...)</literal> in <literal>WHERE</literal> 
     clause in native replication mode. 
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=433">bug 433</ulink>) (Bo Peng)
    </para>
    <para>
     In native replication mode, queries including time functions (e.g. <function>now()</function>, <function>CURRENT_TIMESTAMP</function> etc.) are rewritten to a timestamp constant value. 
     However, <productname>Pgpool-II</productname> doesn't support queries including time functions and <literal>IN (SELECT ...)</literal> in <literal>WHERE</literal> clause.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-10-11 [be2e21c]
    -->
    <para>
     Fix memory leak in <function>trigger_failover_command()</function>. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-10-09 [50eb310]
    -->
    <para>
     Fix memory leak when memory_cache_enabled = on and write SQLs are sent. (Bo Peng)
    </para>
    <para>
     In a explicit transaction, the <literal>SELECT</literal> results are cached in temporary buffer.
     If a write <acronym>SQL</acronym> is sent which modifies the table, the temporary buffer should be reset.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-10-09 [b6fbb58]
    -->
    <para>
     Test: Fix occasional failure in regression 065.bug152. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-09-19 [ab22c8a]
    -->
    <para>
     Add missing <filename>pgpool_recovery--1.0--1.1.sql</filename> file to update 
     <function>pgpool_recovery()</function> function version to 1.1. (Bo Peng)
     Add missing pgpool_recovery--1.0--1.1.sql file to update pgpool_recovery() function version to 1.1. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-27 [7db4027]
    -->
    <para>
     Do not update <xref linkend="guc-pool-passwd"> if the password length is incorrect. 
      (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=419">bug 419</ulink>) (Takuma Hoshiai, Tatsuo Ishii)
    </para>
    <para>
     For <productname>Pgpool-II</productname> 3.7 or before, the password stored in 
     <xref linkend="guc-pool-passwd"> is <literal>MD5</literal> password only. 
      So check the correctness of <xref linkend="guc-pool-passwd"> by scanning entire file.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-10 [1457c2a]
    -->
    <para>
     Test: Update <filename>clean.sh</filename> which clean up regression test results. (Bo Peng)
    </para>
    <para>
     Patch provided by Jesper Pedersen.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-10 [964f2d8]
    -->
    <para>
     Add .gitignore files. (Bo Peng)
    </para>
    <para>
     Patch provided by Jesper Pedersen.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-08-05 [5f915b3]
    -->
    <para>
     Fix segfault when node 0 is in down status in case of both health check 
     and <xref linkend="guc-failover-on-backend-error"> are disabled. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-19">
 <title>Release 3.4.19</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-07-31</simpara>
 </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2018-07-04 [c26135e]
    -->
    <para>
     Fix "write on backend 0 failed with error :"Success"" error.
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=403">bug 403</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     Don't treated it as an error if <function>write()</function> returns 0.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-06-20 [a393d0e]
    -->
    <para>
     Fix memory leaks related to <function>pool_extract_error_message()</function>. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-06-19 [45df6fd]
    -->
    <para>
     Fix an incorrect declare as bool, rather than int in <function>pool_extract_error_message()</function>. (Tatsuo Ishii)
    </para>
    <para>
     This led to a segfault issue mentioned on certain platform.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-06-19 [91f141e]
    -->
    <para>
     Fix segfault in <function>per_node_error_log()</function> on armhf architecture. (Tatsuo Ishii)
    </para>
    <para>
     Patch provided by Christian Ehrhardt.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-06-20 [b8228d5]
    2018-07-11 [bad92c4]
    -->
    <para>
     Test: Fix 006.memqcache test failure. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-18">
 <title>Release 3.4.18</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-06-12</simpara>
 </note>

 <sect2>
  <title>Bug fixes</title>
  <itemizedlist>
   <listitem>
    <!--
    2018-04-18 [34253a5]
    -->
    <para>
     Prevent <xref linkend="PCP-RECOVERY-NODE"> from recovering "unused" status node. (Tatsuo Ishii)
    </para>
    <para>
     This allowed to try to recovery a node without configuration data,
     which leads to variety of problems. 
    </para>
    <para>
     See <ulink url="https://www.pgpool.net/pipermail/pgpool-general/2018-March/006021.html">[pgpool-general: 5963]</ulink> 
     for more details.
    </para>
    <para>
     Also I fixed <function>pgpool_recovery</function> function so that it quotes an 
     empty string argument with double quotes. 
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-17">
 <title>Release 3.4.17</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-04-17</simpara>
 </note>

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

   <listitem>
    <!--
    2018-04-09 [a20855b]
    -->
    <para>
     Test: Add new regression test for node 0 is down. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-04-08 [dfde4ff]
    -->
    <para>
     Make calls to to_regclass fully schema qualified. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-03-20 [5fb797e]
    -->
    <para>
     Test: Improve the test script 003.failover. (Bo Peng)
    </para>
    <para>

    </para>
   </listitem>

   <listitem>
    <!--
    2018-02-27 [d669a0d]
    -->
    <para>
     Allow to support <function>pgpool_switch_xlog</function> <productname>PostgreSQL</productname> 10. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-02-27 [c90dde1]
    -->
    <para>
     Fix <command>pgpool_setup</command> failure in replication mode. (Tatsuo Ishii)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-16">
 <title>Release 3.4.16</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-02-13</simpara>
 </note>

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

   <listitem>
    <!--
    2018-01-29 [717c4dd]
    -->
    <para>
     Set TCP_NODELAY and non blocking to frontend socket. (Tatsuo Ishii)
    </para>
    <para>
     TCP_NODELAY is employed by <productname>PostgreSQL</>, so do we it.
    </para>
   </listitem>

   <listitem>
    <!--
    2018-01-19 [0bca7cf]
    -->
    <para>
     Change systemd service file to use <varname>STOP_OPTS=" -m fast"</>. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2018-01-19 [9dab4b2]
    -->
    <para>
     Change <command>pgpool_setup</> to add restore_command in <filename>recovery.conf</>. (Bo Peng)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

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

   <listitem>
    <!--
    2018-01-24 [a4f9d5a]
    -->
    <para>
     Fix segfault when %a is in <varname>log_line_prefix</> and debug message is on. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=376">bug 376</ulink>) (Tatsuo Ishii)
    </para>

   </listitem>

   <listitem>
    <!--
    2018-01-18 [21451f9]
    -->
    <para>
     Fix queries hanging in <function>parse_before_bind</> with extended protocol and replication + load-balancing. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=377">bug 377</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>

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

<sect1 id="release-3-4-15">
 <title>Release 3.4.15</title>

 <note>
  <title>Release Date</title>
  <simpara>2018-01-09</simpara>
 </note>

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

   <listitem>
    <!--
    2017-12-22 [ae98493]
    -->
    <para>
     Replace <command>/bin/ed</command> with <command>/bin/sed</command> in <xref linkend="pgpool-setup">, because <command>/bin/sed</command> is included in most distribution's base packages. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-12-21 [2168564]
    -->
    <para>
     Change the <filename>pgpool.service</filename> and sysconfig files to output <productname>Pgpool-II</productname> log. (Bo Peng)
    </para>
    <para>
     Removing "Type=forking" and add OPTS=" -n" to
     run <productname>Pgpool-II</productname> with non-daemon mode, because we need to redirect logs.
     Using <command>"journalctl"</command> command to see <productname>Pgpool-II</productname> systemd log.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-12-18 [f908e30]
    2017-12-17 [e799639]
    -->
    <para>
     Fix timestamp data inconsistency by replication mode. (Bo Peng)
    </para>
    <para>
     From <productname>PostgreSQL</productname>10 the column
     default value such as 'CURRENT_DATE' changes,
     <productname>Pgpool-II</productname> didn't rewrite
     timestamp by the added default values. This caused data inconsistency.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-12-10 [c34517f]
    -->
    <para>
     Fix returning transaction state when "ready for query" message received. (Tatsuo Ishii)
    </para>
    <para>
     We return primary or master node state of ready for query message to
     frontend. In most cases this is good. However if other than primary
     node or master node returns an error state (this could happen if load
     balance node is other than primary or master node and the query is an
     erroneous SELECT), this should be returned to frontend, because the
     frontend already received an error.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-11-16 [9e21ef9]
    -->
    <para>
     Fix pgpool start message printed multiple times. (Tatsuo Ishii)
    </para>
   </listitem>

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

<sect1 id="release-3-4-14">
 <title>Release 3.4.14</title>

 <note>
  <title>Release Date</title>
  <simpara>2017-11-01</simpara>
 </note>

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

   <listitem>
    <!--
    2017-10-31 [97b08f7]
    -->
    <para>
     Add different pgpool.sysconfig file for RHEL6 and RHEL7. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=343">bug 343</ulink>) (Bo Peng)
    </para>
    <para>
     In RHEL6, the "-n" option is needed to redirect log.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-10-08 [f484c61]
    -->
    <para>
     Fix finding primary node is not working in 3.4.12, 3.4.13. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-09-22 [eb9347e]
    -->
    <para>
     Fix bug mistakenly overriding global backend status right after failover. (Tatsuo Ishii)
    </para>
    <para>
     See <ulink url="http://www.sraoss.jp/pipermail/pgpool-general/2017-September/005786.html">[pgpool-general: 5728]</ulink> for more details.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-09-11 [588996f]
    -->
    <para>
     Deal with OpenSSL 1.1. (Tatsuo Ishii, Muhammad Usama)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-13">
 <title>Release 3.4.13</title>

 <note>
  <title>Release Date</title>
  <simpara>2017-09-05</simpara>
 </note>

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

   <listitem>
    <!--
    2017-08-24 [4bae117]
    -->
    <para>
     Doc: Fix documentation about load-balancing. (Yugo Nagata)
    </para>
    <para>

    </para>
   </listitem>

   <listitem>
    <!--
    2017-08-15 [d29d0eb]
    -->
    <para>
     Fix ancient bug of <function>pool_unread()</function>. (Tatsuo Ishii)
    </para>
    <para>
     When <function>realloc()</function> is called in <function>pool_unread()</function>, it did not update the
     buffer size.  This could cause variety of memory corruption and
     unexpected data reading from backend. The reason why we did not found
     that is, probably recently <productname>Pgpool-II</productname> starts extensively to use
     <function>pool_unread()</function>.

    </para>
   </listitem>

   <listitem>
    <!--
    2017-08-03 [cd4b6e9]
    -->
    <para>
     Test: Fix Java program in 005.regression test. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-08-03 [be2e8ff]
    -->
    <para>
     Fix for when failover is triggered by worker process, it is possible that wrong DB node could failover. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=303">bug 303</ulink>) (Tatsuo Ishii)
    </para>
    <para>
     This is due to the db_node_id member in the <varname>POLL_CONNECTION</varname> structure is not initialized in the process (in child process the member is properly initialized). To solve the problem, add new function <function>pool_set_db_node_id()</function> to set the structure member variable and call it inside <function>make_persistent_db_connection()</function>.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-07-31 [3fcbf78]
    -->
    <para>
     Fix starting unnecessary transaction when <command>SET</command> command is issued. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-07-27 [f81d820]
    -->
    <para>
     Fix for <ulink url="http://www.pgpool.net/pipermail/pgpool-general/2017-July/005679.html">[pgpool-general: 5621]</ulink> <function>Failover()</function> function should be executed with health check alarm disabled. (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-07-20 [ce47f4f]
    -->
    <para>
     Allow make dist to include <filename>pgpool.service</filename>. (Yugo Nagata)
    </para>
   </listitem>
  </itemizedlist>
 </sect2>
</sect1>

<sect1 id="release-3-4-12">
 <title>Release 3.4.12</title>

 <note>
  <title>Release Date</title>
  <simpara>2017-07-11</simpara>
 </note>

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

  <itemizedlist>
   <listitem>
    <!--
    2017-06-29 [0a1b675]
    -->
    <para>
     Importing the latest changes in the <productname>MemoryManager API</productname> from <productname>PostgreSQL</productname> code. (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-06-21 [8991f6e]
    -->
    <para>
     Fixing  <ulink url="http://www.sraoss.jp/pipermail/pgpool-hackers/2017-June/002390.html">[pgpool-hackers: 2390]</ulink>Problems with the relative paths in daemon mode (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-06-19 [7b90252]
    -->
    <para>
     Adjust function name change in <productname>PostgreSQL</productname> 10 dev head. (Tatsuo Ishii)
    </para>
    <programlisting>
     pg_current_wal_location     -> pg_current_wal_lsn
     pg_last_wal_replay_location -> pg_last_wal_replay_lsn
    </programlisting>

   </listitem>

   <listitem>
    <!--
    2017-05-31 [4d2281e]
    -->
    <para>
     Fix query cache hang when used by node.js. (Tatsuo Ishii)
    </para>
    <para>
     See <ulink url="http://www.pgpool.net/pipermail/pgpool-general/2017-May/005569.html">[pgpool-general: 5511]</ulink> for more details.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-05-28 [d313520]
    -->
    <para>
     Deal with <productname>PostgreSQL</productname> 10 in streaming replication delay checking. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-05-27 [b755fd4]
    -->
    <para>
     Fix query cache memory leak. (Tatsuo Ishii)
    </para>
    <para>
     Clearing cache buffers in case of no oid queries (like <command>BEGIN</command>,
     <command>CHECKPOINT</command>, <command>VACUUM</command>, etc) should have been done, but it did not.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-05-10 [e4ce880]
    -->
    <para>
     Fix corner case bug in <productname>Pgpool-II</productname> starting up. (Tatsuo Ishii)
    </para>
    <para>
     It is possible that a failover request is accepted before primary node
     is searched.  This leads <productname>Pgpool-II</productname> to a strange state: there's no
     primary node if the failed node was a primary node (even if new
     primary node exists as a result of promotion of existing standby).
    </para>
    <para>
     See <ulink url="http://www.pgpool.net/pipermail/pgpool-hackers/2017-May/002321.html">[pgpool-hackers: 2321]</ulink> for more details.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

</sect1>

<sect1 id="release-3-4-11">
 <title>Release 3.4.11</title>

 <note>
  <title>Release Date</title>
  <simpara>2017-04-28</simpara>
 </note>

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

  <itemizedlist>
   <listitem>
    <!--
    2017-04-12 [60ae422]
    -->
    <para>

     Fix for 0000299: Errors on the reloading of configuration.
     <ulink url="http://www.pgpool.net/mantisbt/view.php?id=299">(Bug 299)</ulink> (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-04-04 [877e7ad]
    -->
    <para>
     Fix coverity warnings. (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-03-31 [6f25856]
    -->
    <para>
     Fix for <ulink url="http://www.sraoss.jp/pipermail/pgpool-general/2017-March/005454.html">[pgpool-general: 5396]</ulink> pam ldap failure. (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-03-24 [1172e6c]
    -->
    <para>
     Fix for 0000296: Pgpool v3.6.2 terminated by systemd because the service Type has been set to 'forking'.
     <ulink url="http://www.pgpool.net/mantisbt/view.php?id=296">(Bug 296)</ulink> (Muhammad Usama)
    </para>
   </listitem>

  </itemizedlist>

 </sect2>

</sect1>

<sect1 id="release-3-4-10">
 <title>Release 3.4.10</title>

 <note>
  <title>Release Date</title>
  <simpara>2017-03-17</simpara>
 </note>

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

  <itemizedlist>

   <listitem>
    <!--
    2017-03-17 [ba1bcc3]
    -->
    <para>
     Add "Wants=network.target" to pgpool.service file.
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=294">bug 294</ulink>) (Bo Peng)
    </para>
   </listitem>
   <listitem>
    <!--
    2017-03-09 [1ddb7f1]
    -->
    <para>
     Fix  <link linkend="PCP-PROMOTE-NODE">pcp_promote_node</link> bug that fails promoting node 0. (Yugo Nagata)
    </para>
    <para>
     The master node could not be promoted by pcp_promote_node with
     the following error;
    </para>

    <programlisting>
     FATAL: invalid pgpool mode for process recovery request
     DETAIL: specified node is already primary node, can't promote node id 0
    </programlisting>

    <para>
     In streaming replication mode, there is a case that Pgpool-II
     regards the status of primary node as "standby" for some reasons,
     for example, when pg_ctl promote is executed manually during
     Pgpool-II is running, in which case, it seems to Pgpool-II
     that the primary node doesn't exist.
    </para>

    <para>
     This status mismatch should be fixed by pcp_promote_node, but when the node
     is the master node (the first alive node), it fails as mentioned above.
    </para>

    <para>
     The reason is as following. before changing the status, pcp_promote_node
     checks if the specified node is already primary or not by comparing the
     node id with PRIMARY_NODE_ID. However, if the primary doesn't exist from
     Pgpool-II's view, PRIMARY_NODE_ID is set to 0, which is same as MASTER_NODE_ID.
     Hence, when the master node is specified to be promoted, pcp_promote_node
     is confused that this node is already primary and doesn't have to be
     promoted, and it exits with the error.
    </para>

    <para>
     To fix this, pcp_promote_node should check the node id by using
     REAL_PRIMARY_NODE_ID, which is set -1 when the primary doesn't exist,
     rather than PRIMARY_NODE_ID.

    </para>
   </listitem>


   <listitem>
    <!--
    2017-02-28 [5b4f78c]
    -->
    <para>
     Add the latest release note link to README file.(Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-02-23 [2b7217e]
    -->
    <para>
     <productname>Pgpool-II</productname>should not perform ping test after bringing down the VIP. (Muhammad Usama)
    </para>

    <para>
     This issue was reported by the reporter of
     bug:[pgpool-II 0000249]: watchdog sometimes fails de-escalation
    </para>
   </listitem>

   <listitem>
    <!--
    2017-02-23 [7ed400b]
    -->
    <para>
     Fix to release shared memory segments when <productname>Pgpool-II</productname>exits.
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=272">bug 272</ulink>) (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-02-14 [c1cd41c]
    -->
    <para>
     Fix for  <ulink url="http://www.pgpool.net/pipermail/pgpool-general/2017-February/005373.html">[pgpool-general: 5315]</ulink> pg_terminate_backend (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-02-06 [8fa731a]
    -->
    <para>
     Adding the missing ExecStop and ExecReload commands to the systemd service configuration file. (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-30 [6362ba6]
    -->
    <para>
     Fix for 281: "segmentation fault" when execute <link linkend="PCP-ATTACH-NODE">pcp_attach_node</link>.
     (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=281">bug 281</ulink>) (Muhammad Usama)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-30 [fb58877]
    -->
    <para>
     Fix load balancing bug in streaming replication mode. (Tatsuo Ishii)
    </para>
    <para>
     In an explicit transaction, any SELECT will be load balanced until
     write query is sent. After writing query is sent, any SELECT should be
     sent to the primary node. However if a SELECT is sent before a sync
     message is sent, this does not work since the treatment of writing
     query is done after ready for query message arrives.
    </para>
    <para>
     Solution is, the treatment for writing query is done in executing the writing query as well.
    </para>

    <para>
     The bug has been there since V3.5.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-30 [8371649]
    -->
    <para>
     Fix yet another kind mismatch error in streaming replication mode. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-27 [4f98bf0]
    -->
    <para>
     Fix <function>do_query()</function>hangs after close message. (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-27 [7512482]
    -->
    <para>
     Fixing stack smashing detected. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=280">bug 280</ulink>) (Muhammad Usama)
    </para>
    <para>
     It was a buffer overflow in <function>wd_get_cmd</function> function

    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-11 [29b61eb]
    -->
    <para>
     Remove elog/ereport calls from signal handlers. (Tatsuo Ishii)
    </para>
    <para>
     See  <ulink url="http://www.pgpool.net/pipermail/pgpool-hackers/2016-December/001950.html">[pgpool-hackers: 1950]</ulink> for details.
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-10 [39d24e7]
    -->
    <para>
     Fix bug failed to create INET domain socket in FreeBSD if listen_addresses = '*'. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=202">bug 202</ulink>) (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-04 [8598d5a]
    -->
    <para>
     Fix for 0000249: watchdog sometimes fails de-escalation. (<ulink url="http://www.pgpool.net/mantisbt/view.php?id=249">bug 249</ulink>) (Muhammad Usama)
    </para>

    <para>
     The solution is to use the <function>waitpid()</function> system call without WNOHANG option.

    </para>
   </listitem>

   <listitem>
    <!--
    2017-01-04 [bd92a11]
    -->
    <para>
     Fix connection_life_time broken by authentication_timeout. (Yugo Nagata)
    </para>
   </listitem>

   <listitem>
    <!--
    2016-12-28 [afebadf]
    -->
    <para>
     Fix authentication timeout that can occur right after client connections. (Yugo Nagata)
    </para>
   </listitem>

  </itemizedlist>

 </sect2>

</sect1>

<sect1 id="release-3-4-9">
 <title>Release 3.4.9</title>

 <note>
  <title>Release Date</title>
  <simpara>2016-12-26</simpara>
 </note>

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

  <itemizedlist>

   <listitem>
    <!--
    2016-12-23 [f5e9a2a]
    -->
    <para>
     Tightening up the watchdog security. (Muhammad Usama)
    </para>

    <para>
     Now wd_authkey uses the HMAC SHA-256 hashing.
    </para>
   </listitem>

   <listitem>
    <!--
    2016-12-22 [79f1ba8]
    -->
    <para>
     Add pgpool_adm extension in <productname>Pgpool-II</productname>RPM. (Bo Peng)
    </para>
   </listitem>

   <listitem>
    <!--
    2016-12-20 [888ac16]
    -->
    <para>
     Fix occasional segfault when query cache is enabled. (bug 263) (Tatsuo Ishii)
    </para>
   </listitem>

   <listitem>
    <!--
    2016-10-27 [f37c592]
    -->
    <para>
     Do not cancel a query when the query resulted in an error other than in native replication mode. (Tatsuo Ishii)
    </para>
    <para>
     It was intended to keep the consistency, but there's no point in other
     than native replication mode.
    </para>
   </listitem>

   <listitem>
    <!--
    2016-10-27 [c9e203d]
    -->
    <para>
     Remove obsoleted option "-c" in pgpool command. (Tatsuo Ishii)
    </para>
    <para>
     Also fix typo in the help message.
    </para>
   </listitem>

   <listitem>
    <!--
    2016-09-24 [8aa7586]
    -->
    <para>
     Change the default value of search_primary_node_timeout from 10 to 300. (Tatsuo Ishii)
    </para>
    <para>
     Prior default value 10 seconds is sometimes too short for a standby to
     be promoted.
    </para>
    <para>
     Per [pgpool-general: 5026].
    </para>
   </listitem>

   <listitem>
    <!--
    2016-09-21 [b306e04]
    -->
    <para>
     Fix the case when all backends are down then 1 node attached. (bug 248) (Tatsuo Ishii)
    </para>
    <para>
     When all backends are down, no connection is accepted. Then 1
     PostgreSQL becomes up, and attach the node using pcp_attach_node. It
     successfully finishes. However, when a new connection arrives, still
     the connection is refused because pgpool child process looks into the
     cached status, in which the recovered node is still in down status if
     mode is streaming replication mode (native replication and other modes
     are fine). Solution is, if all nodes are down, force to restart all
     pgpool child.
    </para>
   </listitem>

   <listitem>
    <!--
    2016-09-09 [8231f65]
    -->
    <para>
     Do not use random() while generating MD5 salt. (Tatsuo Ishii)
    </para>
    <para>
     random() should not be used in security related applications.  To
     replace random(), import PostmasterRandom() from PostgreSQL.  Also
     store current time at the start up of Pgpool-II main process for later
     use.
    </para>
   </listitem>

   <listitem>
    <!--
    2016-09-06 [891ce0f]
    -->
    <para>
     Don't ignore sync message from frontend when query cache is enabled. (Tatsuo Ishii)
    </para>
   </listitem>

  </itemizedlist>

 </sect2>

</sect1>

