pgpool-II 4.5.4 Documentation | |||
---|---|---|---|
Prev | Up | Appendix A. Release Notes | Next |
Release Date: 2022-12-06
Many enhancements are added to this version for easier configuration and administration. New dynamic spare process management mode is added. Streaming replication delay can be controlled by time, rather than WAL bytes. Pgpool-II and PCP's listen addresses accept multiple addresses. Full configuration of Unix socket directory is now possible. Allow to customize the command used by trusted_servers for checking upstream connection. New PostgreSQL 15 SQL parser is imported. Performance is also improved in query cache.
Major enhancements are as follows:
Add new dynamic spare process management feature. This feature allows selecting between static and dynamic process management modes.
Allow to specify replication delay by time in streaming replication mode. For this purpose new parameter delay_threshold_by_time is introduced.
As PostgreSQL already does, Pgpool-II now supports unix_socket_directories, unix_socket_group and unix_socket_permissions for more flexible and precise control of UNIX domain sockets.
Allow to use comma separated multiple listen addresses in listen_addresses and pcp_listen_addresses. They control which interfaces accept connection attempts, which can help prevent repeated malicious connection requests on insecure network interfaces.
Allow to customize the command used by trusted_servers for checking upstream connection. For this purpose new parameter trusted_server_command is introduced.
Import PostgreSQL 15's SQL parser.
Speed up query cache by reducing lock contention. This allows concurrent running clients to fetch cache contents much more quicker.
Rename configuration parameter socket_dir to unix_socket_directories.
Configuration parameter delegate_IP is renamed to delegate_ip. For compatibility with the old versions, the old parameter delegate_IP can still work. If the old parameter delegate_IP is used, Pgpool-II will set the value to delegate_ip and throw a warning message.
Parameter status messages from backend are now forwarded to frontend. When a parameter status message arrives from backend, Pgpool-II memorized it but did not forward to frontend. Now they are forwarded to frontend. Applications using Pgpool-II should be prepared to accept the message. But since PostgreSQL already sends parameter status messages to frontend whenever they are generated, those application that are working with PostgreSQL should have no problem with this change.
Add new dynamic spare process management feature. (Jianshen Zhou, Muhammad Usama)
This feature allows selecting between static and dynamic process management modes. Static process management is the same as the existing behavior of Pgpool-II, where it spawns all child processes at startup. The new Dynamic mode keeps track of idle processes and forks or kills processes to keep this number within the specified boundaries.
Four new settings, process_management_mode, process_management_strategy, min_spare_children, and max_spare_children are added to configure the process management behavior, while process_management_strategy allows selecting between three possible scaling-down strategies.
Allow to specify replication delay by time. (Tatsuo Ishii)
delay_threshold specifies replication delay upper limit in bytes. Add similar parameter called delay_threshold_by_time so that the limit can be specified by time (seconds). The new parameter is effective if it is greater than 0. In this case SHOW POOL NODES and pcp_node_info display the replication delay in seconds. If the parameter is set to 0, delay_threshold_by_time is ignored and falls back to delay_threshold mode.
For this purpose new member standby_delay_by_time is added to shared memory data Backendinfo to distinguish whether replication delay is measured in bytes (standby_delay_by_time = false) or seconds (standby_delay_by_time = true). If standby_delay_by_time is true, standby_delay is measured in second * 1000000, so that the precision is 6 digits after decimal point.
Support for unix_socket_directories and related parameters. (Masaya Kawamoto)
Rename configuration parameter socket_dir to unix_socket_directories, and add new configuration parameters unix_socket_group and unix_socket_permissions.
Add trusted_server_command configuration parameter. (Takuma Hoshiai)
This feature is able to specify a command that is used by trusted_servers for checking up stream connection. Previously, ping command was only used, and it was hard coded.
Default is 'ping -q -c3 %h' which means same as before.
Implement comma separated multiple listen addresses. (Tatsuo Ishii)
Previously Pgpool-II only allowed to set single hostname, IP or '*' to the listen_addresses parameter. Now we can set multiple listen addresses to the parameter as PostgreSQL already does.
Also pcp_listen_addresses now accepts comma separated multiple listen addresses.
Import PostgreSQL 15's SQL parser.(Bo Peng, Tatsuo Ishii)
Major changes of PostgreSQL 15 parser include:
Add new SQL MERGE command
MERGE INTO ... USING ...
Add new option HEADER MATCH to COPY FROM
COPY ... FROM stdin WITH (HEADER MATCH);
Allow foreign key ON DELETE SET actions
CREATE TABLE t1 ( ... FOREIGN KEY (c1, c2) REFERENCES t2 ON DELETE SET NULL (c2) );
Allow SET ACCESS METHOD in ALTER TABLE
ALTER TABLE ... SET ACCESS METHOD ...;
Replace exclusive locking with shared locking in query cache. (Tatsuo Ishii)
Previously the query cache module used semaphore to protect critical region in the query cache module. However this had serious down side because the locking using semaphore is exclusive lock. This introduces unnecessary wait for cache reading clients and performance degradation when there are many concurrent clients.
To overcome the issue replace locking implementation
with flock(2)
which allows shared
locking. Now the cache reading clients do not need to fight each
other to obtain a lock thus this increases concurrency.
For this purpose pgpool main process creates a dummy file as
logdir/memq_lock_file and opens it. The file
descriptor is inherited by all child process so that they can
issue flock(2)
on the file.
Add validations of wd_lifecheck_password and recovery_password format. (Masaya Kawamoto)
Enhance parameter status handling. (Tatsuo Ishii)
When a parameter status message arrives from backend, Pgpool-II memorized it but did not forward to frontend. This commit allows forwarding a parameter status message to frontend.
Change the way to obtain replication delay when delay_threshold_by_time is specified. (Tatsuo Ishii)
Use pg_stat_replication.replay_lag. This way makes the code much simpler and more precise replication delay can be obtained. The only downside is pg_stat_replication.replay_lag is only available in PostgreSQL 10 or later (previous method can be used in 9.5 or later).
Implement flush tracking feature. (Tatsuo Ishii)
When a flush message arrives from frontend, any pending message from backend should be flushed and sent to frontend. In order to do that, this commit implements "flush tracking" feature. i.e. when a flush message arrives, pgpool sets "flush pending" flag in each pending messages. If the response message from backend corresponds to the pending message with the flush pending flag being set, the message is immediately flushed to frontend, rather than buffered.
Enhance pgproto. (Tatsuo Ishii)
Allow to show ParameterStatus's parameter name and value.
Add new command 'z'. This is similar to 'y' except 'z' reads only 1 message and do not wait for "ready for query" arrives (or timeout if no message arrives within 1 second).
Downgrade LOG message "new IPC connection received" to DEBUG1. (bug 775) (Bo Peng)
This message is output periodically and should not be logged as LOG. Patch is created by pstef and reviewed by Bo Peng.
In this release same bug fixes as Pgpool-II 4.3.4 are already applied. See Section A.24 for more details of those fixes.
Doc: Update documentation of AWS configuration example and add sample scripts for AWS. (Bo Peng)