[pgpool-general: 2333] pgpool-II 3.2.7, 3.1.10, 3.0,14 released

Nozomi Anzai anzai at sraoss.co.jp
Fri Dec 6 14:49:58 JST 2013


Pgpool Global Development Group is pleased to announce the availability
of pgpool-II 3.2.7, 3.1.10, 3.0,14. These and 3.3.2 which was released last
week are the latest stable minor versions of each major versions of pgpool-II.

You can download the source code, installer, RPMs from:
http://pgpool.net/mediawiki/index.php/Downloads

===============================================================================
                               Release Notes
===============================================================================

    - Fix incorrect time stamp rewriting in replication mode for certain
      time zones. (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      Time stamp rewriting calls "SELECT now()" to get current time.
      Unfortunately the buffer for the current time is too small for
      certain time zones such as "02:30". Note that
      non-30-minutes-time-zone such as "0900" does not reveal the problem.
      This explains why we haven't the bug report until today.

      Bug reported in [pgpool-general: 2113] and fix provided by Sean
      Hogan.
      http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html

    - installer: Fix the way to specify pgpoolAdmin version in
      redhat/rpm_installer/getsources.sh. (Yugo Nagata) [3.3]

    - Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be
      overridden at build time when compiling for different PG major
      versions. (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      Patch contributed by Christoph Berg ([pgpool-general: 2127]).
      http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html

    - watchdog: Fix a warning/error when compiling with
      -Werror=format-security. (Tatsuo Ishii) [3.3]

      Patch contributed by Christoph Berg ([pgpool-general: 2127]).
      http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html

    - configure: Remove -lcompat because it confuses FreeBSD per bug#15.
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]
      http://www.pgpool.net/mantisbt/view.php?id=15

    - Fix segfault when pgpool.conf does not set log_standby_delay.
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      This is caused by wrong initialization for log_standby_delay in
      pool_config.l.
      Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74

    - doc: Modify descriptions about restrictions of parallel mode
      Muliple rows INSERT using VALUES are not supported in parallel mode.
      (Yugo Nagata) [3.3][3.2][3.1][3.0]

    - Avoid calling find_primary_node_repeatedly() when standby node goes
      down. (Tatsuo Ishii) [3.3][3.2][3.1]

      This will reduce the time to failover. Per bug #75, patch modified by
      Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75

    - Fix data inconsistency problem with native replication mode +
      extended protocol case. (Tatsuo Ishii) [3.3][3.2][3.1]

      It is reported that concurrent INSERT using JDBC driver causes data
      difference among database node. This only happens following
      conditions are all met:

      1) Native replication mode
      2) Extended protocol used
      3) The portal created by parse message is reused by bind message
      4) autocommit is on
      5) SERIAL (sequence) is used

      Pgpool-II's parse message function knows it has to lock the target
      table when INSERT (plus #5) is issued by clients. Unfortunately bind
      message function did not know it. Once parse/bind/execute finishes,
      pgpool releases the lock obtained by parse because of #4. JDBC wants
      to reuse the portal and starts the cycle from bind message, which
      does not obtain lock. As as result, lock-free INSERT are floating
      around which causes data inconsistency of course.  The solution is,
      lock the table in bind phase.

      For this bind needs to issue LOCK in extended protocol. This was a
      little bit hard because the module (do_command()) to issue internal
      SQL command (other than SELECT) does not support extended protocol.
      To solve the problem do_query() is modified so that it accepts other
      than SELECT because it already accepts extended protocol.
      The modification is minimum and is only tested for the case called
      from insert_lock(). I do not recommend to replace every occurrence of
      do_command () with do_query() at this point.

      BTW the reason why the bug is not reported is, most users uses JDBC
      with auto commit = off. In this case, the lock obtained by parse
      persists until user explicitly issues commit or rollback.

      Per bug report by Steve Kuekes in [pgpool-general: 2142].
      http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002171.html

    - Fix memory allocation size bug in the code path of query cache.
      (Tatsuo  Ishii) [3.3][3.2]

      In execute() memory allocation size is too small incertain case. No
      bug has been reported so far, but certainly this is a bug.

    - Fix occasional segfault in query cache + extended protocol.
      (Tatsuo Ishii) [3.3][3.2]

      When the query is not "cache safe", bind_msg->param_offset was not
      set in Bind(). However, Execute() unconditionally uses
      bind_msg->param_offset to convert bind parameters to string so that
      they can be added to the cached query string and it causes segfault
      because bind_msg->param_offset is a garbage. Also logic bug to
      calculate bind_msg->param_offset is corrected.

      Per bug#76. http://www.pgpool.net/mantisbt/view.php?id=76

    - Avoid to run out free query cache hash index entry. (Tatsuo Ishii)
      [3.3][3.2]

      If hash index entries are run out, pgpool-II cannot reuse old cache
      entry because pgpool-II always expects there's at least one empty
      hash index entry. To mitigate the problem, if free hash index
      entries are run out, look for victim cache block to reuse the hash
      index entry.

      Per bug #70. http://www.pgpool.net/mantisbt/view.php?id=70

    - installer: checkEnv() didn't do anything and always returned 0.
      (Nozomi Anzai) [3.3]

    - Fix inappropriate shared memory allocation size for clock hand.
      (Tatsuo Ishii) [3.3][3.2]

      The memory for clock hand was allocated as sizeof
      (pool_fsmm_clock_hand)) which is 8 bytes long because the variable is
      declared as:

        static int *pool_fsmm_clock_hand;

      This is plain wrong. The memory size actually needed is only 4 bytes,
      which is sizeof(*pool_fsmm_clock_hand)). In other word, the bug
      allocated unnecessary 4 bytes, which did nothing bd for the
      execution of program. But a bug is a bug.

      Per covery report "1111476 Wrong sizeof argument"

    - Fix "show pool_status" always shows
      memqcache_auto_cache_invalidation as
      0. (Tatsuo Ishii) [3.3]
      Per bug #80. http://www.pgpool.net/mantisbt/view.php?id=80

    - Fix error message in read_password_packet(). (Tatsuo Ishii) [3.3]
      [3.2][3.1][3.0]

    - watchdog: Fix to pass big parameter by pointer instead of by value at
      some function. (Yugo Nagata) [3.3]

    - Fix memory leak when SSL is requested. (Tatsuo Ishii) [3.3][3.2][3.1]
      [3.0]

      When SSL is requested, pgpool child retries to read start up packet.
      However it does not free the memory for previous start up packet.

      Per Coverity report "1111443 Resource".

    - Fix memory leak when do_query() fails in timestamp rewriting.
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      For this purpose free_select_result() is changed to accept NULL
      argument. Per Coverity report "1111454, 1111455 Resource leak".

    - Fix load balance bug in replication mode. (Tatsuo Ishii) [3.3]

      When load_balance_mode = off, SELECTs including writing function
      should be sent to all the DB nodes. Per [pgpool-general: 2221].
      http://www.sraoss.jp/pipermail/pgpool-general/2013-October/002250.html

      The bug was introduced in:
      http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=1ac45a28258074ea4d9d902aca016f970d31f311
      (3.3.1).

    - watchdog: Fix to put null character at end of ping result string
      used in watchdog. (Yugo Nagata) [3.3]

    - Fix target node selection logic when "DEALLOCATE portal|statement".
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      When "DEALLOCATE portal|statement" is used and last prepared
      statement or portal was not found, target node selection map is not
      set. Probably this is not actually harmful because prepared
      statement or portal was not found is an error case. The bug was there
      since day 0.

      Per Coverity report "1111491 Structurally dead code".

    - Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo
      Ishii) [3.3][3.2][3.1][3.0]

      MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this
      point). In reality, probably no one ever tried more than 128 DB nodes
      and that's the reason why nobody noticed.

      Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds
      write".

    - Do not set/unset fronted connection info for dead backend. (Tatsuo
      Ishii) [3.3][3.2]

      Per bug #82. http://www.pgpool.net/mantisbt/view.php?id=82

    - Fix that the script forgets to allow public access to pgpool_catalog.
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      The bug prevents inserting data into user tables if pgpool_catalog is
      created in native replication mode.  The bug was there from day 1. I
      wonder why nobody noticed until today.
      Per [pgpool-general-jp: 1229].
      http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html

    - doc: Add description that it is recommended to specify multiple
      servers to trusted_servers. (Yugo Nagata)[3.3]

    - Fix uninitialized variable in error case in pool_do_auth().
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]

      If there's no valid backend, pgpool will return garbage pid to
      frontend in auth phase. Actually because no backend is available,
      frontend will be disconnected later on. So this is not harmless.
      Per Coverity report "1127331 Uninitialized scalar variable".

    - Fix to add node id range check when issue an error message using node
      id. (Tatsuo Ishii) [3.3][3.2][3.1][3.0]
      Per Coverity report #1111433 "Out-of-bounds read".

    - Fix buffer overrun bug and resource leak bug of parse_copy_data().
      (Tatsuo Ishii) [3.3][3.2][3.1][3.0]
      Per Coverity report 1111427 "Out-of-bounds write" and 1111453
      "Resource leak".

    - Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii) [3.3][3.2]
      [3.1][3.0]
      Coverity pointed out that if pool_get_id() returns an error,
      VALID_BACKEND will access out of array. Per Coverity report 1111413
      "Memory - illegal accesses".

    - Fix query cache is enabled and protocol version = 2 case. (Tatsuo
      Ishii) [3.3][3.2]

      When the protocol version = 2, we assume that session state is
      "idle". This is not feasible but no way. I recommend to not use
      query cache with protocol 2.
      Per Coverity report 1111488 "Uninitialized scalar variable".

    - Fix strftime() usage in pool_pools(). (Tatsuo Ishii) [3.3][3.2][3.1]

      The buffer is not large enough as expected by the second parameter.
      This is not harmless because the format string will not produce
      longer result string than the buffer.
      Per Coverity report 1111426 "Out-of-bounds access".

    - RPM: Improved to specify the versions of pgool-II and PostgreSQL in
      the. spec file. (Nozomi Anzai) [3.3]

    - Fix resource leak in make_persistent_db_connection. (Tatsio Ishii)
      [3.3][3.2][3.1][3.0]

      For this pupose, new static function
      free_persisten_db_connection_memory is added.
      Per Coverity report #1111468.

    - Fix a bug that connection check to trusted servers fails when the RTT
      is very short. (Yugo Nagata) [3.3][3.2]

    - Fix several small bug fixes detected by Coverity. (Tatsuo Ishii)
      [3.3][3.2]

===============================================================================

-- 
Nozomi Anzai
SRA OSS, Inc. Japan


More information about the pgpool-general mailing list