This release of ProxySQL 3.0.3 includes a significant number of new features, particularly around PostgreSQL Extended Query Protocol support, along with numerous bug fixes and dependency updates to improve stability and performance.
Compared to version 3.0.2, ProxySQL 3.0.3 introduces the following changes:
New Features:
PostgreSQL Extended Query Protocol Support:
Add PostgreSQL extended query (prepared statement) support (24fecc1f, #5044)
Lays groundwork for handling PostgreSQL extended query protocol, including parsing, caching, and execution framework stubs.
Added Describe message handling (a741598a, #5044)
Added Close statement handling (4d0618c2, #5044)
Added Bind and Execute support (8bb248ce, #5044)
Added support for protocol-supplied (out-of-band) parameter typing (4ebff4c0, #5044)
Parameter types will be part of hash calculation. Includes refactoring and optimizations.
Added support for protocol level parameter type (87ce0d0a, #5044)
Added variable (3619fa5d, #5044)
pgsql-max_stmts_per_connection
Added SET statement tracking support (02eb58db, #5044)
Added DEALLOCATE <stmt_name> and DEALLOCATE ALL support (070d4ca1, #5044)
Added prepared statement map and connection status fields to PROXYSQL INTERNAL SESSION output (f715c546, #5044)
Supports Cancel Request protocol via separate connection with PID and secret key validation.
Returns BackendKeyData message on successful authentication.
Add support for PostgreSQL transaction command aliases and ROLLBACK AND CHAIN (45271572, #5153)
Add tracking for PostgreSQL search_path parameter (b005c2dd, #5149)
Added SHOW FULL PGSQL ACTIVITY and SHOW PGSQL ACTIVITY handling (fc4d7f76, #5156)
Add backend PID/state to stats_pgsql_processlist and create pg_stat_activity-style view (f3ea1793, #5156)
Bug Fixes:
Memory & Stability:
Fix heap-after-use between PROXYSQL INTERNAL SESSION and SHOW PROCESSLIST (4b28bb6c, #5191)
Fix potential use-after-free by SHOW PROCESSLIST in MySQL (639f9d0c, #5180)
Fix potential use-after-free by SHOW PROCESSLIST in PgSQL (c0978f93, #5182)
processlist: Prevent crash due to SQLITE_TOOBIG (5219d4be, #5165)
Ensure PgSQL_Errors_statsvdestructor is invoked on delete (ff50bb4e, #5112, #5078)
Fixes a bug where deleting PgSQL_Errors_stats instances with only a forward declaration caused the destructor to be skipped, leading to memory leaks.
Fix: REST API server crash due to malformed multipart POST request (0a0336ec, #5072, #5074)
Disables POST preprocessing option in libhttpserver and validates Content-Type header for POST /sync.
Ensure PgSQL_Threads_Handler and PgSQL_HostGroups_Manager objects are released when ProxySQL shuts down or restarts (8d8577b0, #5086, #5087, c7ce5a82, #5078)
Fixes client hangs after executing PROXYSQL RESTART and attempting reconnection.
Fixed a crash occurring during session destruction (9e4b76d6, #5044)
Align DateStyle parsing with PostgreSQL (d4b2de9e, #5144)
Fix ParameterStatus capitalization for DateStyle, TimeZone, and IntervalStyle (03b63f68, #5146)
Fixed multiplex disabled due to CREATE SEQUENCE (c6138656, #5078)
If the startup connection includes untracked session parameters (passed via options=), the connection must be destroyed instead of returned to the pool (a69a4437, #5078)
Inject implicit Sync if simple query arrives before extended query cycle is completed (9a5fa148, #5078)
Injects an implicit Sync, processes extended query messages, then executes the simple query, and sends ReadyForQuery only after the simple query completes.
Fix omission of ReadyForQuery after error with pending extended-query messages (fff2a913, #5078)
Ensures ReadyForQuery is always emitted immediately when a result indicates an error, preventing clients from waiting indefinitely.
Ensure consistent handling of NoData packets in PQsendQueryPrepared (8a3bab50, #5078)
Explicitly appends a NoData packet to the result for commands like INSERT, DELETE, or UPDATE to provide consistent behavior.
Fixed DISCARD ALL tag (4d3dc7b7, #5044)
Handled DISCARD ALL, DISCARD PLANS, send rest of the variants to backend Fixed connection reset for client connection (27f1fed4, #5044)
Prevent overwrite of named statements (7c71fe1a, #5044)
Named prepared statements cannot be overwritten and will raise an error if redefined.
Refined Bind Message parameter format, value handling, and result format iterator (b989fc2b, #5044)
Fixed SonarQube warnings where applicable (06383750, #5044)
Corrected advancement of current pointer (ef2b0cb1, #5044)
Fixed few compilation warnings (3cff4f9d, #5044)
Removed server_capabilities from PgSQL modules (bc87d0d9, #5044)
Removed autocommit_on_hostgroup from PgSQL modules (87ad15b0, #5044)
Removed AutoCommit related code from PostgreSQL session (3cff4f9d, #5044)
Removed last_insert_id from PgSQL modules (026f458f, #5044)
Removed warning tracking code from PgSQL_Connection (2a9f6729, #5044)
Preserve implicit transactions with pipeline + FLUSH (23a764ea, #5118, #5119)
Switches to libpq pipeline mode and replaces intermediate SYNC messages with FLUSH, ensuring all client query frames execute as part of the same implicit transaction
Intercept LISTEN command and return "not supported" for both simple and extended query flows (0391a8d4, #5109, #5078)
Admin & Configuration:
Fixed PROXYSQL STOP (38befb84, #5173)
Resolved issues with admin PROXYSQL PAUSE/RESUME commands (67d383de, #5173)
Add validation for LOAD <module> FROM CONFIG (0a336de0, #5113)
Adds validation for mysql_users, pgsql_users, mysql_servers, pgsql_servers, and proxysql_servers.
Checks for duplicates and mandatory fields, returning descriptive error messages.
Other Fixes:
QueryInfo::end_time should always be greater than or equal to start_time (8d29742e, #5099)