pgpool-II 4.7.0 Documentation
Prev | Up | Appendix A. Release Notes | Next

# A.30. Release 4.4.4

> Release Date: 2023-08-17

## A.30.1. Changes

- Install system exit callback only after initialization of shared memory. (Muhammad Usama)

  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.

- Disallowing setting the max_spare_children greater than num_init_children when process_management_mode is set to "dynamic". (Muhammad Usama)

  Config post-processing stage now throws an error if `num_init_children` is smaller than `max_spare_children`. Commit also adjusts the number of child processes spawned at startup based on the configured process management strategy. For the Aggressive strategy, `max_spare_children` number of processes is spawned; for the other two strategies, `min_spare_children` number of children gets created at startup.

- Downgrade log message. (Tatsuo Ishii)

  It is pointed out in https://www.pgpool.net/mantisbt/view.php?id=806 that there are log entries in the log file:

  LOG: pool_pending_message_set_flush_request: msg: Parse

  The messages were for debugging and the log level should have been a DEBUG*. So I changed the log level from LOG to DEBUG5.

- Add schema qualification to some system catalog inquiry functions. (Tatsuo Ishii)

## A.30.2. Bug fixes

- Fix coverity warning. (Tatsuo Ishii)

  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. https://www.jpcert.or.jp/sc-rules/c-msc05-c.html

- Fix find_primary_node_repeatedly doesn't terminate within search_primary_node_timeout. (Bo Peng)

- Fix crash when v2 protocol is used.(bug 807) (Tatsuo Ishii)

  When read_kind_from_backend() accumulates statistics data, it was not prepared for v2 protocol case.

  Bug report and patch from MCanivez. Slightly modified by me.

- Fix `PREPARE` in multi-statement case. (Tatsuo Ishii)

  If multi-statement query includes `PREPARE` 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.

  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.

  Discussion: https://www.pgpool.net/pipermail/pgpool-general/2023-July/008931.html

  For this new regression test 079..multi_prepare is added.

- Fix pgproto to work with bind message using params. (Tatsuo Ishii)

  Previously pgproto can only process bind messages without params.

- Fix typo in log message. (Bo Peng)

- Fix missing CTE SEARCH and CYCLE rewrites. (Bo Peng)

  In native replication mode, Pgpool-II need to rewrite Date/Time functions to timestamp in WRITE queries. CTE SEARCH and CYCLE rewrites were missing.

- Removed duplicate pcp_listen_address setting in src/sample/pgpool.conf.sample-stream. (Bo Peng)

- Prevent query cache update under shared lock. (Tatsuo Ishii)

  In bug 795 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.

  Back-patch to V4.4 stable where shared locking for query cache was introduced.

- Fix delay_threshold_by_time and prefer_lower_delay_standby. (Tatsuo Ishii)

  They were broken since `delay_threshold_by_time` was introduced in 4.4.

  - `delay_threshold_by_time` was not checked in where_to_send. This broke load balancing when replication is delayed.

  - select_load_balancing_node was broken if both `delay_threshold_by_time` and `prefer_lower_standby_delay` were enabled.

  In order to fix the issue, where_to_send and select_load_balancing_node are fixed. Also add test case for `delay_threshold_by_time` are added to 033.prefer_lower_standby_delay.

  Discussion: https://www.pgpool.net/pipermail/pgpool-general/2023-June/008864.html

- Fix the wrong variable names in replication_mode_recovery_2nd_stage.sample sample script. (Bo Peng)

## A.30.3. Documents

- Fix the missing "logger" application name. (Bo Peng)

- Clarify the meaning of stop mode. (Tatsuo Ishii)

- Remove the incorrect information from release note 4.2.10. (Bo Peng)

  Remove "Fix pgpool_recovery extension script. (Tatsuo Ishii)" from release note 4.2.10.

- Enhance SSH public key authentication setting section in "8.2. Pgpool-II + Watchdog Setup Example". (Bo Peng)

- Fix load balance mode chapter. (Tatsuo Ishii)

  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.

- Enhance online recovery documentation. (Bo Peng)

  Mention that 2nd stage of online recovery does not work properly only for multiple pgpool nodes without watchdog enabled.

## A.30.4. Regression Tests

- Fix occasional 069.memory_leak_extended test failure. (Tatsuo Ishii)

  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.

  Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-May/004338.html

Prev | Home | Next
Release 4.4.5 | Up | Release 4.4.3