pgpool-II 4.5.5 Documentation | |||
---|---|---|---|
Prev | Up | Appendix A. Release Notes | Next |
Release Date: 2023-12-12
This release resolves several long-standing issues, including lacking support for some types of queries in multiple statements and session disconnections issue in some cases. Many enhancements are also added for easier configuration and administration.
Major enhancements are as follows:
Allow to use more kind of multiple statements in a query string.
Allow to load balance PREPARE/EXECUTE/DEALLOCATE.
Allow to set delay_threshold_by_time in milliseconds.
Avoid session disconnection issue in failover/failback/backend error in some cases.
Allow to route queries to a specific backend node for a specific user connection.
Support multiple directories specification for pcp_socket_dir.
Import PostgreSQL 16's SQL parser.
The following normal ERROR messages are downgraded to DEBUG messages. (Bo Peng)
These two messages are caused when the client did not send a terminate message before disconnecting to pgpool. For example, when the client process was forcefully terminated, this error occurs. Although they are harmless, it may sometimes confuse users.
ERROR:unable to flush data to frontend
ERROR: unable to read data from frontend DETAIL: EOF encountered with frontend
If client_idle_limit is set to a non-zero value, the connection will be disconnected if it remains idle since the last query. Because the disconnection is caused by Pgpool-II settings, Pgpool-II should handle it as "DEBUG" instead of "ERROR".
ERROR: unable to read data DETAIL: child connection forced to terminate due to client_idle_limit:30 is reached
-w/--no-password option is not required to read the pcp command password from the password file (~/.pcppass). (Chen Ningwei)
Previously pcp command didn't read the pcp command password from the password file (~/.pcppass) if -w/--no-password option is not given, which is inconsistent with psql.
Add SSH timeout in sample script escalation.sh.sample which is set in wd_escalation_command parameter. (Bo Peng)
Allow to set delay_threshold_by_time in milliseconds. (Tatsuo Ishii)
Previously it was allowed only in seconds. Also put some refactoring.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-August/004372.html
Import PostgreSQL 16 new parser. (Chen Ningwei)
Major changes of PostgreSQL 16 parser include:
Add new option DEFAULT to COPY FROM
COPY ... FROM stdin WITH (default 'xx');
Allow the STORAGE type to be specified by CREATE TABLE
CREATE TABLE t1 ( c1 VARCHAR(10) STORAGE PLAIN, c2 TEXT STORAGE EXTENDED );
Add EXPLAIN option GENERIC_PLAN to display the generic plan for a parameterized query
EXPLAIN (GENERIC_PLAN) SELECT ...;
Allow subqueries in the FROM clause to omit aliases
SELECT COUNT(*) FROM (SELECT ... FROM ...);
Add SQL/JSON constructors
Add VACUUM options: SKIP_DATABASE_STATS, ONLY_DATABASE_STATS to skip or update all frozen statistics and PROCESS_MAIN to only process TOAST tables.
VACUUM (SKIP_DATABASE_STATS); VACUUM (PROCESS_MAIN FALSE) t1 ;
Add new field load_balance_node to SHOW POOL_POOLS and pcp_proc_info. (Tatsuo Ishii)
The new field load_balance_node is "1" if pgpool process is connected by a client and the session uses the backend id as a load balance node. Users can execute the commands to find out if there's any session that uses the backend as the load balance node. If so, shutting down the backend may cause session disconnection.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-July/004353.html
Mitigate session disconnection issue in failover/failback/backend error. (Tatsuo Ishii)
Previously Pgpool-II disconnected client sessions in various cases. This release tries to avoid some of cases, especially when a backend goes down and the backend is not either primary (or main node) nor load balance node.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-July/004352.html
Add new parameter user_redirect_preference_list to allow to send SELECT queries to a specific backend node for a specific user connection. (Bo Peng)
Support multiple directories specification for pcp_socket_dir. (Chen Ningwei)
Allow to load balance PREPARE/EXECUTE/DEALLOCATE. (Tatsuo Ishii)
Previously PREPARE/EXECUTE/DEALLOCATE are not load balanced. In streaming replication/logical replication mode, they were sent to always primary node. In native replication/snapshot isolation mode, they were always sent to all nodes.
Now they can be load balanced if the SQL statement prepared by PREPARE command is a read only SELECT.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-May/004334.html
Add new config parameter log_pcp_processes to allow disable logging normal PCP Process fork and exit status. (Tatsuo Ishii)
When pcp command is executed, pgpool logs its fork/exit event even if there's no error.
Abnormal fork/exit event will be logged even if the parameter is disabled.
Patch is created by Maximilien Cuony and reviewed by Tatsuo Ishii.
Allow to use multiple statements extensively. (Tatsuo Ishii)
This release tries to eliminate pgpool's long standing limitations regarding multiple statements (multi-statements). For example, previously following queries raised errors.
BEGIN;SELECT; SAVEPOINT foo;
Please note that each query in multi-statement is not still load balanced.
Although this is a new feature, it is also meant to be a bug fix, so it has been backported to versions 4.1 to 4.4.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004287.html
Import psqlscan source code into Pgpool-II to judge multi statement query. (Tatsuo Ishii)
Psqlscan is a module in the PostgreSQL source tree. It is essentially subset of PostgreSQL SQL scanner but it is specialized for detecting the end of each SQL statement. Therefore we can count the number of SQL statements in a query string by using it.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004291.html
Add new configuration parameter notice_per_node_statement. (Tatsuo Ishii)
The new GUC variable allows to emit NOTICE message of queries per backend basis. It's similar to log_per_node_statement but as the log level is NOTICE, the log is printed on client's terminal, thus users can know where their queries go to without looking into pgpool log files.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-February/004276.html
Enhance status file reading log. (Tatsuo Ishii)
Previously only if pgpool_status exists and the status is down, a log message was printed. However it is more useful no matter what the status (up or unused) is because it also represents that pgpool_status exists and it is read while pgpool starting up, which is useful information.
Remove pool_config.c and scan.c from git repository. (Tatsuo Ishii)
They are generated files and we should not keep in the git repository.
Remove Makefile.in etc. generated by autoconf. (Tatsuo Ishii)
Also update some .gitignore files and add some new .gitignore files. Now developers need to run autoconf/autoreconf before compiling since the generated files are not provided by git anymore.
Fix race condition with Pgpool-II main and pcp child process. (Tatsuo Ishii)
When pcp child process is forked off, pgpool main process unblock all signals. This could lead to a race condition if a signal is sent to the pcp process before it sets up signal handlers. Fix is, do not unblock signals until the signal handlers are set up.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-September/004398.html
This release fixes the same bugs as other minor releases. See Appendix A for more details of those fixes.
Update Configuration Example "8.2. Pgpool-II + Watchdog Setup Example" to Pgpool-II 4.5 and PostgreSQL 16. (Bo Peng)
Attempt to fix 001.load_balance test timeout. (Tatsuo Ishii)
Enhance regression 001.load_balance. (Tatsuo Ishii)