Release 3.7

Release Date: 2017-11-22

A.23.1. Overview

This version improves reliability of failover by using new watchdog feature and per node health check. Also this version adapts to changes in PostgreSQL 10: new SQL parser, logical replication and some admin functions name changes.

Major enhancements in Pgpool-II 3.7 include:

  • Quorum aware failover feature.

  • Allow specifying the hostnames in pool_hba.

  • Allow to specify per node health check parameters.

  • Support AWS Aurora.

  • Import PostgreSQL 10 SQL parser

  • Support logical replication.

A.23.2. Major Enhancements

  • Quorum and Consensus for backend failover. (Muhammad Usama)

    Add ability in the Pgpool-II to considers the existence of quorum and seek the majority node (Pgpool-II nodes part of the watchdog cluster) consensus to validate the backend node failover request. This feature helps make failover decision better and prevent split brain scenarios.

    The addition of this feature also made some modification in the execution behavior of the failover (failover, failback, promote-node) command.

    Now only the Master node performs the failover, and the failover locks are removed.

    Three new configuration parameters to configure the failover behavior from user side: failover_when_quorum_exists, failover_require_consensus, enable_multiple_failover_requests_from_node.

  • Allow specifying the hostnames in pool_hba. (Muhammad Usama)

    The commit adds the support of hostnames to be used in the address field of pool_hba records, previously only CIDR address was supported.

    Along with allowing the hostnames in address field of the HBA record the commit also made the following enhancements in the area.

    (1) pool_hba records are now completely parsed at the loading time and we now keep the structured data of records instead of raw record lines, This saves the parsing at every new connection time and however little it may be but its a performance enhancement.

    (2) Enhanced parsing now gives the better descriptive error/log messages.

    (3) Better handling of auth-options field.

  • Supporting per node health check parameters. (Tatsuo Ishii, Muhammad Usama)

    Previous implementation of health check is a single serial processing for all of database nodes.

    Now pgpool main process forks health check process for each DB node. This commit enables all health-check related parameter to be configured for each individual backend nodes.

    For example if we have 3 backend nodes and do following configurations.

         health_check_period = 10
         health_check_period0 = 5
        

    Then will set the health_check_period for node 0 to 5 while node-id 1 and 2 will get the value 10

  • Import PostgreSQL 10 SQL parser. (Bo Peng)

  • Support AWS Aurora. (Tatsuo Ishii)

    Add new backend flag "ALWAYS_MASTER" to control the primary node detecting logic. Since we cannot use pg_is_in_recovery() in Aurora, we assign the new flag to a backend which is specified as "writer" in Aurora. Since Aurora always use the same hostname for the master (it's called "writer"), find_primary_node() just returns the node id which has ALWAYS_MASTER flag on.

    See more details about ALWAYS_MASTER flag Table 5-3 .

    Other than that, user can use the streaming replication mode with Aurora. Notice that replication delay cannot be performed in Aurora, sr_check_period should be always 0.

    Also add English/Japanese Aurora setting example.

  • Support logical replication. (Tatsuo Ishii)

    The logical replication mode can be used with PostgreSQL servers operating logical replication. In this mode, PostgreSQL is responsible for synchronizing tables.

    Load balancing is possible in the mode. Since logical replication does not replicate all tables, it's user's responsibility to replicate the table which could be load balanced.

    The sample configuration file is $prefix/etc/pgpool.conf.sample-logical .

    And add support for logical replication mode to pgpool_setup .

A.23.3. Other Enhancements

  • Test: Add some watchdog test cases. (Muhammad Usama)

  • Test: Add new test case "node_js.data" to extended-query-test. (Tatsuo Ishii)

  • Doc: Documentation updates for pool_hba enhancements. (Muhammad Usama)

  • Add "slony mode" to pgpool_setup. (Tatsuo Ishii)

  • Deal with OpenSSL 1.1. (Tatsuo Ishii, Muhammad Usama)

  • Test: Add new regression test "069.memory_leak_extended". (Tatsuo Ishii)

  • Doc: Enhance query cache documents. (Tatsuo Ishii)

  • Doc: Add "Tips for Installation" section. (Tatsuo Ishii)

  • Test: Add new test 011.watchdoc_quorum_failover. (Tatsuo Ishii)

  • Test: Add new test suits. (Tatsuo Ishii)

    The new test suit "extended-query-test" is intended to test extended queries using pgproto command.

  • Add debugging aid to check pending message and backend response. (Tatsuo Ishii)

    New function pool_check_pending_message_and_reply() added. If pending message kind and backend reply message kind is not inconsistent, it prints a debug message. Currently the only client of the function is read_kind_from_backend().

  • Add debugging/testing aid for health check. (Tatsuo Ishii)

A.23.4. Changes

  • Add "role" field to pcp_node_info command. (Tatsuo Ishii)

    Role is the server role: one of "primary", "standby", "master" or "slave".

  • Change master_slave_sub_mode default to 'stream'. (Tatsuo Ishii)

    This is necessary since the default value for the pool_config_variable.c is STREAM_MODE.

  • Allow to fork new health check process when it exits. (Tatsuo Ishii)

  • Add new group "health_check" to PGPOOL SHOW command doc. (Tatsuo Ishii)

  • Remove old html docs and related files. (Tatsuo Ishii)

A.23.5. Bug fix

  • Fix Pgpool-II hanging after receiving 'H' (flush) message in streaming replication mode. ( bug 345 ) (Tatsuo Ishii)

  • Fix exit signal handlers to not call ereport. (Tatsuo Ishii)

    There could be a race condition in the exit signal handlers.

    See [pgpool-hackers:2545] for more details.

  • Doc: Fix table about replicate_select behavior. (Yugo Nagata)

  • Test: Fix bug with memory leak tests and add new memory leak test. (Tatsuo Ishii)

  • Add log after health check retrying succeeds. (Tatsuo Ishii)

    Previously only health check retry logs were produced. So it was not clear if the retry succeeded or not in the end.

  • Add necessary setting for health check retry in the Aurora example. (Tatsuo Ishii)