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

<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 fixe 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 connecttions. (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>

