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

# A.4. Release 4.6.7

> Release Date: 2026-06-04

## A.4.1. Bug fixes

- Allow `pgproto` to accept new line data. (Tatsuo Ishii)

  Now `"\n"` is recognized as a new line. This is necessary for `COPY` command.

- Keep local primary_node_id when leader watchdog reports the initial -2 sentinel. (Tatsuo Ishii)

  Fix a watchdog synchronization issue after simultaneous restart of all pgpool nodes, where standby nodes could overwrite a valid primary_node_id with the initial -2 sentinel value and remain stuck in an uninitialized state indefinitely. Fix is, keep the local primary_node_id when the leader reports the initial -2 sentinel.

  Problem reported by Emond Papegaaij and Claude Code.

  Discussion: Primary node detection race at clean startup

- Fix to not call `pool_get_transaction_isolation()` in `elog(DEBUG)`. (Tatsuo Ishii)

  Fix a FATAL error in aborted transactions caused by DEBUG logging in `where_to_send_main_replica()` and `where_to_send_native_replication()`. The DEBUG logging called `pool_get_transaction_isolation()`, which internally executed queries via `do_query()` and could raise a FATAL error in aborted transactions. Fix is, remove the calls from DEBUG logging.

- Fix empty query case in aborted transaction. (Tatsuo Ishii)

  Fix empty queries in aborted transactions incorrectly raising errors. Empty queries should be allowed in aborted transactions, but a previous commit caused `check_transaction_state_and_abort()` to reject them. Fix is, detect empty queries in `SimpleQuery()` and bypass the check.

  Problem reported by Ronaldo Raivil.

  Discussion: pgpool >= 4.3.2 synthesizes 25P02 on driver health-check probes inside aborted savepoints, breaking ORMs that need to call ROLLBACK TO SAVEPOINT

- Fix description about `ssl_dh_params_file`. (Tatsuo Ishii)

  It actually falls back to compiled-in default not only when the parameter is empty (the default), but when specified parameter is incorrect one.

- Fix PCP main process to remember child pids upon restarting. (Tatsuo Ishii)

  Upon failover/failback, pgpool main process sends a signal to PCP main process to request restarting, and PCP main restarts. Problem is, when PCP main restarts, it forgets the list of pids of its child PCP worker process. As a result, commands such as `pcp_promote_node` could hang indefinitely. Fix is, store PCP worker PIDs in shared memory so they survive PCP main restart.

  Problem reported by Taiki Koshino.

  Discussion: Problem with pcp process

- Fix query cache to invalidate cache when `MERGE` statement is used. (Tatsuo Ishii)

  `MERGE` was introduced in PostgreSQL 15 and Pgpool-II 4.4 imported PostgreSQL 15's parser. However, there was an oversight in query cache sub module: `MERGE` statement did not trigger invalidation of query cache.

  Problem reported by Nadav Shatz.

  Discussion: Re: Proposal: Recent mutated table tracking in memory

- Fix memory leak in a SSL module. (Tatsuo Ishii)

  Fix a memory leak in `load_dh_file()` when invalid DH parameters are supplied. The function failed to free memory returned by `PEM_read_DHparams()`. Also update the copyright notice in the same file to retain the original PostgreSQL copyright.

  Discussion: Memory leak in SSL module

- Fix incorrect routing of `SET transaction_read_only = 0`. (Bo Peng)

  Fix incorrect routing of `SET transaction_read_only = 0` to standby node, which caused query errors. Also replace incorrect bool ret = POOL_BOTH with the proper enum type.

  Problem reported by liujinyang-highgo.

  Discussion: set command 'set transaction_read_only = 0;' routed to standby node and execute failed.

- Remove unnecessary check STREAM in where_to_send_main_replica(). (Tatsuo Ishii)

  The check is already done in check_replication_delay().

- Fix session local relation cache case bug. (Tatsuo Ishii)

  Fix incorrect handling of session local relation cache in `pool_search_relcache()`. Temporary table information could be incorrectly registered in shared relation cache, causing subsequent queries to use stale cache entries and potentially route queries incorrectly. Fix is, avoid registering temp table information in shared relation cache for session local cache entries.

  Discussion: query temp table is routed to standby node.

- Fix lock release leak in `pool_search_relcache()`. (Tatsuo Ishii)

  Fix a lock release leak in `pool_search_relcache()`. During shared relation cache updates, the lock state was not reset correctly after reacquiring an exclusive lock, which could leave the shared memory lock held. Also rename confusing variable `locked` to `locked_by_others` and fix unnecessary `per_node_statement_log` output.

  Discussion: Lock release leak in pool_search_relcache

- Close listening sockets before forking. (Tatsuo Ishii)

  Fix inherited unnecessary listening sockets in forked child processes. Previously, subprocesses such as pcp_main, health check, and lifecheck processes inherited pgpool and/or PCP listening sockets they did not use, which could prevent subsequent pgpool startup from binding ports correctly. Fix is, close unnecessary listening sockets after forking using `close_listening_sockets()`.

  Discussion: Close listening socokets before forking

## A.4.2. Documents

- Doc: fix `ignore_leading_white_space` and `allow_sql_comments` docs. (Tatsuo Ishii)

  They lacked a description on the default values.

## A.4.3. Regression Tests

- Test: addition to 001.load_balance test for previous commit. (Tatsuo Ishii)

Prev | Home | Next
Release 4.7.0 | Up | Release 4.6.6