Skip to content

Releases

ProxySQL 4.0.13

ProxySQL 4.0.13 Pre-release
Pre-release

Choose a tag to compare

@renecannao renecannao released this 28 Nov 09:38
e49994f

ProxySQL 4.0.13 Release Notes

Released November 28, 2026.

ProxySQL 4.0.13 builds on the MySQL and PostgreSQL improvements in 3.1.13 and adds new ways to query your data and ProxySQL's own statistics.

Highlights

  • Run reports against a local copy of your MySQL data and keep it up to date from the MySQL binary log.
  • Use your driver's prepared-statement API to bind values in queries against Admin and STATS.
  • Let the monitor return recovered MySQL and PostgreSQL servers to service even when no queries are arriving. This is enabled by default in 4.0.13.

Before Upgrading

  • Back up persistent DuckDB files. The plugin now uses DuckDB 2.0.0. Existing 1.x files keep their format when opened in 2.0, but new files created with the 2.0 defaults cannot be opened in 1.x. Keep a backup if you may need to roll back. DuckDB storage compatibility
  • Check DuckDB queries and extensions. Update single-arrow lambdas to the lambda x: â€Ķ syntax and use DuckDB 2.0 builds of external extensions. DuckDB upgrade notes
  • Build DuckDB and MySQL Router compatibility from source. The 4.0 packages include MySQLX and GenAI. DuckDB and the MySQL Router compatibility plugin still require a source build. Use a matching ProxySQL core and plugin build. Packaging issue

New Features

Run reports on a local copy of your MySQL data

Choose the MySQL tables you need for reporting. The DuckDB plugin takes a snapshot, then applies committed changes from the binary log to a local DuckDB file. You can run reports against that copy while your application continues writing to MySQL. Check replication progress in stats_duckdb_replica. Replica setup

The replica follows one MySQL source and needs GTIDs and row-based binary logging with full row images. Select transactional tables with primary keys. If the source schema changes, take a new snapshot. Avoid tables affected by foreign-key CASCADE or SET NULL actions. Changes from those actions can be missing from the replica. Replica requirements and limits

If you have existing MySQL reports, duckdb-mysql_dialect=mysql_analytical can translate supported SELECT queries, including eligible joins and aggregates. The native DuckDB dialect remains the default. On the native listeners, MySQL and PostgreSQL drivers can also prepare supported reads and writes. Drivers now receive column types for supported values in ordinary query results, so they can return numbers and binary values directly. MySQL query compatibility · DuckDB protocol guide

Bind parameters in Admin and STATS queries

A monitoring tool can now prepare a query against stats_mysql_query_digest and bind a different username each time it runs. This works with both MySQL and PostgreSQL drivers. Admin can also prepare supported writes under the usual permissions. STATS stays read-only, and PostgreSQL clients must use UTF-8. Send ProxySQL commands such as LOAD and SAVE as ordinary SQL requests. #6666

Plugin developers can use ABI 17 to register a provider for read-only prepared SQL. Existing plugins using supported older interfaces can still load with the matching debug or release build mode. Embedded execution contract

Return recovered servers to service automatically

A quiet reader group can recover before the next application query arrives. A successful monitor ping can bring back a server ProxySQL took out of rotation after errors once the usual recovery conditions are met. This is on by default for both protocols in 4.0.13. To turn it off, set mysql-monitor_unshun_on_ping_success or pgsql-monitor_unshun_on_ping_success to false. #6686

Bug Fixes

  • MySQLX. TLS upgrades complete correctly, and clients receive buffered results before a backend disconnect is reported. Mapped accounts can also use stored caching_sha2_password verifiers when the client connects over TLS and ProxySQL can verify the backend certificate and hostname. MySQLX authentication · #6603 · #6638
  • Managed servers. Reloading the server configuration locally or through Cluster keeps endpoints supplied by discovery plugins in service. Changes to mysql-aws_locality_awareness applied through a managed plugin now affect server selection across availability zones. #6638 · #6680
  • GenAI query tools. The read-only MCP tools now run PostgreSQL queries in a read-only transaction. They also accept ordinary literals and aliases that contain SQL keywords. GenAI read-only query tools

MySQL and PostgreSQL Updates

This release also adds direct PostgreSQL TLS, runs initialization SQL on new PostgreSQL backend connections, and reduces the memory needed to send large results. It includes the shared fixes for interrupted PostgreSQL bulk transfers, MySQL transaction routing, and the login crash in debug builds, along with HTTPS for REST and Prometheus. 3.1.13 release notes · 3.0.13 release notes

Security Fixes

  • Fixed memory corruption when ProxySQL processed malformed MySQL packets after a client logged in. Reported by Uvi-12. GHSA-w9p8-gf9c-hffr
  • Fixed a read beyond the end of a malformed PostgreSQL login message that could crash ProxySQL before authentication. Reported by Uvi-12. GHSA-5xv5-24pg-gmq8
  • Fixed a separate crash during PostgreSQL SCRAM password authentication when the client's login message was incomplete. Reported by aoi0120. GHSA-qhxc-2rc8-r6hh

Platform Support

This is the last planned feature release with AlmaLinux 8 packages. #6734

ProxySQL 3.1.13

ProxySQL 3.1.13 Pre-release
Pre-release

Choose a tag to compare

@renecannao renecannao released this 28 Nov 09:38
e49994f

ProxySQL 3.1.13 Release Notes

Released November 28, 2026.

ProxySQL 3.1.13 brings the Stable fixes to the Innovative series and improves how ProxySQL opens connections, recovers servers after outages, and sends large results.

Highlights

  • PostgreSQL 17 and newer clients can use direct TLS to connect to ProxySQL.
  • A reader that recovers after an outage can return to service even when no queries are arriving. This is opt-in in 3.1.13.
  • Large results need less buffering for both MySQL and PostgreSQL.

New Features

Connect PostgreSQL clients with direct TLS

With pgsql-have_ssl=true on ProxySQL, clients built with libpq 17 or newer can set sslnegotiation=direct to skip the initial PostgreSQL SSL request. For example, use psql 'host=proxy.example port=6133 dbname=app sslmode=verify-full sslnegotiation=direct' with your trusted CA configured. This applies to the client connection to ProxySQL. Clients using the usual SSL request continue to work. #6662

Bring healthy servers back into service in quiet pools

A server that ProxySQL temporarily took out of rotation after errors can now return when the monitor successfully pings it and the normal recovery conditions are met. A quiet reader group can recover before the next application query arrives. Enable mysql-monitor_unshun_on_ping_success or pgsql-monitor_unshun_on_ping_success for the protocol you use. Both are off by default in 3.1.13. #6686

Use less memory to send results

MySQL and PostgreSQL connections typically start with 1 KiB of output buffer space, down from 32 KiB. ProxySQL can send large responses directly from their existing buffers and resume sending when a slow client is ready to read again. MySQL connections that use compression still grow their buffer when needed. #6667

Choose which services start and protect metrics with HTTPS

As in 3.0.13, you can start the MySQL and PostgreSQL workers, Admin listeners, and monitors independently. The REST API and /metrics can use HTTPS, require a trusted client certificate, and listen on a specific address. PostgreSQL applications can also keep supported set_config() settings across pooled connections when the ParserSQL SET parser is enabled. Startup controls · REST API configuration · PostgreSQL session settings

Bug Fixes

PostgreSQL

  • pgsql-init_connect now runs before the first query on a new backend connection and runs again when an initialized connection is reset. Use it for commands such as SET statement_timeout = '5s'. A nonempty hostgroup init_connect overrides the global setting. Use commands that return no rows. Set per-client settings such as search_path through the client so ProxySQL can track them. #6709
  • When a driver requests a limited number of rows from an unnamed portal, ProxySQL honors that limit on native PostgreSQL backends. Drivers can also read available responses with Flush before sending Sync. #6577

MySQL and MariaDB

  • Drivers that use MySQL's change-user command can reauthenticate with caching_sha2_password on an existing connection, including a compressed one. When ProxySQL advertises caching_sha2_password, switching to an account stored with a mysql_native_password hash requires TLS or RSA key retrieval. Pass-through accounts still require a new connection. #6724
  • Fixed a crash that could occur during MySQL login in debug builds when ProxySQL logged the selected database. The fix also covers the MariaDB ed25519 authentication switch. #6738

Monitoring and Shared Fixes

  • Collecting query-digest memory metrics causes less contention when there are many distinct queries in the statistics tables. ProxySQL reuses the memory estimate until the digests change enough to refresh it. The refresh threshold defaults to 5%. Set admin-stats_query_digest_memory_refresh_pct=0 to recalculate on every read. #6674
  • The shared fixes keep PostgreSQL bulk transfers from tying up other sessions, preserve routing to the MySQL transaction's backend after a failed statement, and prevent Admin saves from overwriting query rules or firewall settings while the corresponding runtime is unavailable. 3.0.13 fixes and security updates

Security Fixes

  • Fixed memory corruption when ProxySQL processed malformed MySQL packets after a client logged in. Reported by Uvi-12. GHSA-w9p8-gf9c-hffr
  • Fixed a read beyond the end of a malformed PostgreSQL login message that could crash ProxySQL before authentication. Reported by Uvi-12. GHSA-5xv5-24pg-gmq8
  • Fixed a separate crash during PostgreSQL SCRAM password authentication when the client's login message was incomplete. Reported by aoi0120. GHSA-qhxc-2rc8-r6hh

Platform Support

This is the last planned feature release with AlmaLinux 8 packages. #6734

ProxySQL 3.0.13

Choose a tag to compare

@renecannao renecannao released this 28 Nov 09:40
e49994f

ProxySQL 3.0.13 Release Notes

Released November 28, 2026.

ProxySQL 3.0.13 adds HTTPS for Prometheus and the REST API, lets you start just the MySQL or PostgreSQL services you use, and fixes several ways database requests could hang or reach the wrong server.

Highlights

  • PostgreSQL clients can cancel a query while it waits for a database connection. An interrupted COPY no longer leaves a connection in the pool that could interfere with another client.
  • In MySQL, a failed statement no longer sends the next query away from an active transaction when transaction_persistent is enabled.

New Features

Protect the REST API and Prometheus endpoint

Set admin-restapi_use_ssl=true to serve the REST API and /metrics over HTTPS. To restrict access to clients with a trusted certificate, enable admin-restapi_ssl_verify_client and configure the client CA. You can also bind the listener to a specific IPv4 or IPv6 address or a Unix socket with admin-restapi_interface. Upgrading keeps existing listeners on HTTP unless you enable HTTPS. REST API configuration

Start only the database services you use

Both protocols start by default. To run just one, disable the other protocol's components in the top-level configuration.

  • PostgreSQL only. Set mysql-workers=false, mysql-admin=false, and mysql-monitor=false.
  • MySQL only. Set pgsql-workers=false, pgsql-admin=false, and pgsql-monitor=false.

Either Admin listener can still configure both protocols. Startup controls

Keep PostgreSQL session settings when reusing connections

If your application calls set_config() to set a schema search path, ProxySQL can now carry that setting over when it gives the application a different pooled connection. This works for supported calls with literal arguments when the ParserSQL SET parser is enabled. Rolling back the change also restores the previous setting. Configuration and supported calls

Bug Fixes

MySQL and MariaDB

  • Fixed a crash that could occur during MySQL login in debug builds when ProxySQL logged the selected database. #6738
  • MariaDB SET STATEMENT â€Ķ FOR now follows query rules. Previously it could go to the user's default server group and fail with Unknown database if the schema was only on the server group selected by the rule. ProxySQL also recognizes how MariaDB Connector/J 3.5.11 and later initialize a session, so the driver's first command no longer prevents later queries from following routing rules. #6592 · #6638
  • With transaction_persistent enabled, a SELECT after a failed INSERT stays on the writer while the transaction is open. ProxySQL also rejects an unscoped SET TRANSACTION immediately inside an active transaction, so the error no longer surfaces on the next query. #6618
  • Query statistics now group savepoint statements that differ only in the savepoint name. For example, SAVEPOINT a and SAVEPOINT b both appear as SAVEPOINT ?. Review any query rule that matches the old digest for a specific savepoint name. #6675

PostgreSQL

  • Drivers can use Flush to read available responses before sending Sync. If an extended query fails, ProxySQL now waits for Sync before accepting the next batch as required by PostgreSQL, so the connection can continue after the error. #6577
  • Large COPY transfers leave more time for other sessions on the same worker. SQL queued during a transfer waits for it to finish. If a transfer is interrupted, ProxySQL discards the backend connection instead of lending it to another client. #6502 · #6634 · #6669
  • Cancelling a query while it waits for a backend connection stops it from running later. Cancellation also reaches PostgreSQL in fast-forward mode, and cancelling an idle session leaves it connected. #6577
  • The simple-query cache now keeps results separate for different session settings. For example, two clients using the same login with different search_path values get separate cache entries even when their SQL is identical. #6638 · #6651
  • A wrong password or invalid database name no longer makes ProxySQL take a healthy PostgreSQL server out of rotation. Backend error metrics now use PostgreSQL's SQLSTATE error codes, so check dashboards that filter on the old 9999 code. #6655
  • Older libpq clients could hang while reading some large results over TLS. ProxySQL now sends smaller TLS records so those clients can finish reading. #6722
  • A configured pgsql-init_connect or hostgroup init_connect previously could hang the first query on a new connection. In 3.0.13 ProxySQL logs a warning and ignores these settings so the query can proceed. #6709

Operations

  • PROXYSQL STOP now acknowledges the command before disconnecting Admin clients. Reconnect to Admin to issue PROXYSQL START. A quick stop immediately after a start can no longer hit the listener race that could crash ProxySQL. #6559 · #6719
  • Trying to save query rules or firewall settings while the corresponding runtime is unavailable returns an error and preserves the saved configuration. #6559
  • Cluster skips a sync when a peer returns an unusable response and keeps the local configuration. A separate fix prevents routine Admin commands, including reading Prometheus metrics, from getting stuck during synchronization. #6705 · #6502
  • Fixed a potential crash when an idle MySQL or PostgreSQL backend answered a pool health check immediately. With --idle-threads, ProxySQL also finishes sending TLS results that could previously stall partway through. #6626 · #6707

Security Fixes

  • Fixed memory corruption when ProxySQL processed malformed MySQL packets after a client logged in. Reported by Uvi-12. GHSA-w9p8-gf9c-hffr
  • Fixed a read beyond the end of a malformed PostgreSQL login message that could crash ProxySQL before authentication. Reported by Uvi-12. GHSA-5xv5-24pg-gmq8
  • Fixed a separate crash during PostgreSQL SCRAM password authentication when the client's login message was incomplete. Reported by aoi0120. GHSA-qhxc-2rc8-r6hh

Dependencies

  • Updated bundled OpenSSL to 3.5.9, curl to 8.23.0, and SQLite to 3.54.1. #6639 · #6693

Platform Support

This is the last planned feature release with AlmaLinux 8 packages. #6734

v4.0.12

v4.0.12 Pre-release
Pre-release

Choose a tag to compare

@renecannao renecannao released this 05 Nov 19:16
e2f317a

ProxySQL 4.0.12 Release Notes

Release date: 2026-11-05

ProxySQL 4.0.12 adds ways to use familiar database clients for embedded analytics, connect ProxySQL to an InnoDB Cluster, and integrate database routing with optional AWS providers. It also makes plugin configuration more dependable across restarts, reloads, and shutdowns, and includes the protocol, transaction, and security fixes from 3.0.12 and 3.1.12.

The new DuckDB and MySQL Router compatibility plugins require source installation in this release. Downloadable 4.0.12 packages contain MySQLX and GenAI; they do not contain DuckDB or Router. Operators upgrading existing deployments should also review the new PCRE2 default, plugin ABI requirements, and MySQLX configuration migration below.

Highlights

  • Embedded analytical SQL: the DuckDB plugin serves a shared database through MySQL and PostgreSQL simple-query clients, without running a separate DuckDB server.
  • InnoDB Cluster integration: the Router compatibility plugin registers ProxySQL with cluster metadata and maintains supported topology and users in native ProxySQL configuration.
  • Optional AWS integration: compatible external providers can supply short-lived IAM credentials, RDS/Aurora locality information, discovery inventories, and managed configuration. These providers are not bundled.
  • More dependable plugin configuration: persistent tables restore before initialization, failed MySQLX route loads retain the working configuration, and MCP distinguishes staged settings from active runtime state.
  • PostgreSQL and prepared-query improvements: native PostgreSQL backend execution, prepared-result caching for both protocols, backup routing, and pool diagnostics are included from 3.1.12.
  • Eight security advisories fixed: the release includes the four high-severity and four medium-severity corrections shared by all three release tiers.

New Features

Embedded analytics through familiar clients

The DuckDB 1.4.5 plugin lets applications and database tools submit analytical SQL through an ordinary MySQL or PostgreSQL connection. Both listeners reach one embedded database inside the ProxySQL process. Authentication uses mysql_users and pgsql_users, so operators can manage admission through existing ProxySQL account tables. The plugin is available through source installation only in 4.0.12. (#6133.)

Use DuckDB SQL and simple-query client APIs: MySQL COM_QUERY and PostgreSQL simple Query are supported, while client prepared statements and PostgreSQL extended execution are not. Each request must contain one statement. Result columns are advertised as text, so applications that depend on numeric or other native type metadata must account for that boundary. Result adaptation is decided before execution, avoiding a second execution of writes or volatile expressions. (#6133, #6374.)

By default, the database is :memory: and lasts for the process lifetime. Set duckdb-database_path to a file-backed database to preserve data across restarts. Defaults are a 1GB DuckDB memory limit, two execution threads, and 100 connections across both listeners. DuckDB shares the process with ProxySQL, so leave memory for the core, other plugins, and connection buffers. There is no per-query timeout.

Authenticated users share the database without per-user database or table ACLs. The listeners default to 0.0.0.0:6031 and 0.0.0.0:6034; choose the intended bind addresses before exposing them. Database read-only mode defaults to false, and external access separately defaults to false. Read-only mode controls database access when opened; it does not replace external-access restrictions, and read-only :memory: is rejected. Clients cannot change engine-wide controls such as memory, threads, or external access with SET.

Settings use duckdb-* rows in the normal global-variable tables. Memory, thread, and connection-admission limits can change live. Database path, read-only mode, and listener-address changes require reopening the affected resource. Disabling external access can apply live; enabling it requires reopening the database. Extension autoload and autoinstall are disabled in the vendored build. See the DuckDB quickstart and configuration reference. (#6179, #6374.)

ProxySQL routing for InnoDB Cluster

Operators using MySQL Shell to manage an InnoDB Cluster can now register ProxySQL as a Router-compatible instance. The plugin reads cluster metadata and reconciles supported servers, users, hostgroups, and routing rules, reducing the need to maintain that inventory separately. It supports Metadata 2.2, single-primary Group Replication, and MySQL Shell-managed asynchronous read replicas. This plugin also requires source installation in 4.0.12. (#6144.)

The default writer endpoint is 6446, the reader endpoint is 6447, and query-aware read/write splitting uses 6450. The writer and reader endpoints switch to permanent fast-forward after their first matched COM_QUERY; the splitting endpoint continues to use query rules and transaction state. The existing operator-owned 6033 endpoint is retained. Lower-ID operator rules with apply=1 can override Router defaults, and reconciliation preserves operator-owned rows while rejecting ownership collisions. (#6144, #6474.)

Bootstrap accepts its password through a protected input channel such as --bootstrap-password-fd, writes configuration, and exits without serving clients. Passwords in the bootstrap URI are rejected. Start ProxySQL normally with the plugin loaded afterward; changing listener addresses requires a restart rather than a live rebind. Metadata failures no longer leave the plugin reporting ready while metadata is unavailable. (#6374, #6474.)

Metadata TLS settings persist across bootstrap and refreshes. In this implementation, both VERIFY_CA and VERIFY_IDENTITY require an explicit CA and check the hostname. REQUIRED checks negotiated TLS after Connector/C connects and does not authenticate the server; use a verifying mode when server authentication is required. MySQL X Router endpoints, takeover of an existing Router deployment, ReplicaSet, ClusterSet, and Routing Guidelines import are outside this release's scope. See the Router guide. (#6374.)

Optional AWS authentication, locality, and discovery

Deployments using RDS or Aurora can connect per-user backend authentication to an external IAM token source. Users whose backend-authentication policy selects aws_iam obtain tokens through that provider; the core handles token ownership, asynchronous acquisition, connection-pool isolation, and retries. A missing compatible token provider causes IAM authentication to fail closed. Provider deployment, AWS credentials or permissions, and the required TLS identity configuration must be supplied separately. (#6048, #6476.)

For deployments spread across regions or availability zones, mysql-aws_locality_awareness can bias selection toward eligible nearby RDS/Aurora backends using provider metadata and hostgroup policy. It defaults to false. The bias does not rewrite configured server weights or Cluster checksums, and zero-weight servers remain ineligible. Missing or expired locality metadata leaves selection neutral. (#6048.)

Discovery services let a compatible external controller maintain changing endpoint inventories while a selected native monitor continues to handle server roles, health, replication lag, and failover. A controller selecting monitor kind none also owns placement. Managed-configuration services add scoped revisions, idempotency, encrypted secrets, and provider-owned restoration; aws_managed=true requires the compatible management provider and Web binding at startup. These are integration contracts, not bundled AWS providers or automatically enabled services. See the plugin API and locality guide. (#6383, #6477, #6514.)

Database routing and prepared-query improvements

PostgreSQL applications can fetch a prepared result in batches through named portals, or subscribe to database events with LISTEN/NOTIFY. These capabilities use the new native backend protocol, which is enabled by default for new TCP backend connections. The previous PostgreSQL client-library path remains selectable with pgsql-use_native_backend_protocol=false.

Experimental prepared-result caching lets eligible repeated MySQL and PostgreSQL reads reuse a result through existing cache budgets, TTLs, and rules. Unsupported exchanges continue to the backend. Writes do not invalidate cached results. Configure caching only where skipping execution is acceptable, and flush affected entries after changes to permissions, schema semantics, or backend defaults. The 3.1.12 notes describe the supported execution and cache scopes. (#6194.)

Routing also gains MariaDB transaction-position checks for causal reads, helping applications choose replicas that have reached a required write. Subnet matching lets query rules cover groups of client addresses. Operators can reserve spare servers within a hostgroup and inspect pool-wait statistics when connection capacity is exhausted. The 3.0.12 and 3.1.12 feature sections explain these shared additions. (#6222, #6223, #6219, #6150.)

...

Read more

v3.1.12

v3.1.12 Pre-release
Pre-release

Choose a tag to compare

@renecannao renecannao released this 05 Nov 19:16
e2f317a

ProxySQL 3.1.12 Release Notes

Release date: 2026-11-05

ProxySQL 3.1.12 extends the Innovative tier for applications that need more than simple request-and-response database traffic. PostgreSQL applications can fetch prepared results in batches and receive background notifications through the proxy. Operators can reserve spare servers within a hostgroup, see when connection pools are under pressure, and give MySQL listeners different advertised version strings.

The release also introduces experimental prepared-result caching for a restricted set of MySQL and PostgreSQL SELECT operations. It includes all Stable 3.0.12 reliability and security fixes, including protection against replaying partially answered batches and fixes for eight published security advisories.

Highlights

  • More PostgreSQL application patterns: native backend execution supports named portals for fetching results in batches and LISTEN/NOTIFY for asynchronous notifications.
  • Prepared-result caching: existing cache rules can select eligible prepared SELECTs in both protocols, with explicit limits and no automatic invalidation after writes.
  • Fairer access to busy pools: released backend capacity is offered to older waiting sessions before the releasing session starts its next buffered command.
  • Visible pool pressure: MySQL and PostgreSQL hostgroup statistics expose acquisitions, waits, accumulated wait time, and current waiters.
  • Spare servers within a hostgroup: lower-weight servers can remain in reserve until the configured primary-availability condition allows them to participate.
  • Per-listener MySQL identities: different listeners can advertise different versions, with a consistent identity for each accepted connection.
  • Shared maintenance and security fixes: the complete Stable 3.0.12 fixes are included, together with embedded OpenSSL 3.5.7 and updated platform support.

New Features

Native PostgreSQL backend execution

PostgreSQL applications may need to keep an execution open while fetching part of its results, or keep a connection subscribed to database notifications. ProxySQL 3.1.12 adds native backend protocol support for these patterns, alongside ordinary queries, prepared execution, authentication, TLS, and cancellation. ProxySQL manages the backend exchange directly; the new portal and notification capabilities use this native path. (#5882, #6112.)

Native mode is enabled by default for new TCP backend connections through pgsql-use_native_backend_protocol=true. Unix-domain backend connections continue to use the PostgreSQL client library, libpq. Operators can select that library path for new connections by setting the variable to false and loading PostgreSQL variables to runtime. Existing connections retain their original implementation until replaced.

The native path supports cleartext, MD5, SCRAM-SHA-256, and SCRAM-SHA-256-PLUS channel binding over TLS, subject to the configured authentication policy and available credentials. Unsupported authentication reports an error rather than silently trying another backend implementation. Stored SCRAM verifier pass-through requires a successful frontend SCRAM exchange and the same verifier, including its salt, on each destination backend. The default pgsql-authentication_method=3 requires SCRAM; an MD5 secret requires policy level 1 or 2 and an MD5 backend challenge. (#5865, #6112.)

Configured backend trust, client certificates, CRLs, and TLS version bounds apply. With use_ssl=1, the certificate chain is verified when a CA is configured; hostname verification is not requested. Pool reuse preserves the established TLS transport, and connections with incomplete results or fatal protocol failures are retired instead of being handed to another session. (#5882, #6112.)

Fetch PostgreSQL results in batches with named portals

Applications processing a large result may want to request a limited number of rows at a time rather than receive the whole result at once. A PostgreSQL portal holds a prepared execution and its position in the result. Named portals now support creating, describing, executing, suspending, resuming, and closing that execution through ProxySQL. (#5882, #6112.)

A bounded Execute can return part of the result and suspend the portal until the application requests more rows. ProxySQL keeps the owning backend connection attached for the portal's lifetime, so later fetches continue the same execution. Portal state is cleared at the relevant transaction or connection boundary. General migration of an existing portal between hostgroups is not supported.

Receive PostgreSQL background notifications

Applications use LISTEN and NOTIFY to receive database events without repeatedly issuing a query. Native PostgreSQL sessions can now retain a subscription and receive asynchronous notifications while the frontend is idle. ProxySQL keeps that session's backend connection attached so notifications reach the subscribing application. (#6112, #6442.)

UNLISTEN * and DISCARD ALL release the subscription-related connection pin; an individual UNLISTEN does not. Detection handles comments and LISTEN appearing after another statement, but cannot discover a subscription hidden inside a function or DO block. This capability requires the native TCP backend path; LISTEN is refused on a libpq backend connection.

PostgreSQL extended-query batches

Prepared PostgreSQL operations arrive as a sequence of messages to prepare, bind, execute, and synchronize work. Eligible messages can now be sent to the backend in batches while preserving application-visible response order and the client's Sync boundary. Query-rule timeouts still apply to each Execute, and an error skips the remaining messages through Sync. This allows applications to retain their extended-query batching pattern through the proxy without changing transaction boundaries. (#6401.)

Experimental caching of prepared SELECT results

Applications that repeatedly execute the same prepared read with the same parameters can now reuse an eligible cached result. Both protocol prototypes use the existing cache budgets, cache_ttl rules, TTLs, soft refresh, and empty-result policy. No separate enabling variable is added; existing rules may select newly eligible prepared execution. Exchanges outside the supported subset execute normally on the backend. (#6194.)

For MySQL, eligible prepared SELECT executions can cache binary result rows. Parameters, effective parameter types, prepared SQL, connection identity, destination hostgroup, and tracked session settings distinguish entries. Cursor execution, pending LongData, transactions, autocommit-off sessions, hostgroup locks, and GTID- or lag-constrained requests bypass caching. Only a complete, successful single result set is stored.

For PostgreSQL, preparation must have completed in an earlier cycle. The supported execution is one unnamed-portal Bind, an optional portal Describe, an Execute without a row limit, and an explicit Sync. SQL, parameter type identifiers, parameter bytes and formats, result formats, routing identity, and tracked/startup settings distinguish entries. Preparing and executing in the same cycle, named portals, transactions, pinned/session-dependent exchanges, locking reads, errors, notices, and partially streamed results bypass caching. Mixed per-column result formats are supported and participate in the cache identity.

These are bounded experimental TTL caches, not a general transaction cache. Writes do not invalidate entries. The operator's rule must identify reads that are safe to reuse: classifying a statement as SELECT does not prove that it has no volatile functions, hidden side effects, or untracked session dependencies. Flush affected entries after changes to permissions, backend defaults, schema semantics, or initialization policy. The MySQL prepared-cache guide explains its configuration and eligibility boundaries.

Backend-pool fairness and pressure metrics

When a hostgroup reaches its connection limit, an active client should not repeatedly reclaim released capacity while older requests wait. MySQL and PostgreSQL pool scheduling now offers released capacity to existing waiters before the releasing session begins its next buffered command. Waiting sessions retain deadline handling, disconnect detection, recovery, and cleanup while capacity is unavailable. (#6195, #6570.)

Operators can inspect stats_mysql_hostgroup_connection_pool and stats_pgsql_hostgroup_connection_pool to distinguish connection demand from available capacity. The tables expose acquisitions_total, waits_total, wait_time_us_total, and live waiters; _reset variants support interval inspection. Prometheus exposes corresponding acquisitions, waits, wait seconds, and waiter metrics by protocol and hostgroup. Retrying one logical wait does not create another wait count, and an Admin reset read does not reset Prometheus cumulative counters. (#6150.)

Spare servers within a hostgroup

Operators can keep lower-weight servers in reserve without creating another hostgroup. Set hostgroup_settings.backup_weight_threshold to a positive value T: servers with weight >= T are primaries, while servers with 0 < weight < T are backups. Weight 0 remains unselectable. A threshold of 0, the default, retains ordinary weighted selection. (#6219.)

backup_availability determines when the backup set becomes eligible:

Value What keeps the primary set available
selectable (default) A primary passes the normal candidate-eligibility filters.
status Any primary remains ONLINE.
capacity An ONLINE primary has a free connection slot.

This distinction lets operators choose whether backups should respond to normal...

Read more

v3.0.12

Choose a tag to compare

@renecannao renecannao released this 05 Nov 19:16
e2f317a

ProxySQL 3.0.12 Release Notes

Release date: 2026-11-05

ProxySQL 3.0.12 improves the reliability of applications that use ProxySQL to route database traffic. It fixes cases where a connection failure could cause earlier statements in a batch to run twice, where transaction state could be lost during error recovery, and where malformed client packets could compromise the proxy. The release addresses eight published security advisories.

It also extends causal-read routing to MariaDB, allowing applications to select a replica that has caught up with a required transaction, and adds subnet matching to query rules so operators can apply routing policies to groups of client addresses.

Highlights

  • Safer query retries: a batch is not replayed on another backend after an earlier result has already reached the application, preventing duplicate execution of those statements.
  • MariaDB support for causal reads: routing now understands MariaDB transaction identifiers as well as MySQL GTIDs, helping applications avoid reading a replica before a required write has arrived.
  • Eight security advisories fixed: bounds checks and protocol validation address four high-severity and four medium-severity issues shared by all three release tiers.
  • More reliable PostgreSQL sessions: authentication, transaction recovery, prepared statements, and connection cleanup receive correctness fixes.
  • Subnet-based query rules: client and proxy address conditions can match IPv4 and IPv6 network prefixes rather than requiring a rule for each address.
  • Updated platform support: Ubuntu 26.04 packages are available for both architectures, and the release embeds OpenSSL 3.5.7.

New Features

MariaDB transaction identifiers for causal reads

Applications often write to a primary server and send subsequent reads to replicas. Replication takes time: choosing a replica without checking its progress can return data that predates the application's write. Causal-read routing uses a transaction identifier to select a replica that has reached the required position.

ProxySQL now understands MariaDB's domain-server-sequence identifiers alongside MySQL's UUID:sequence identifiers. For MariaDB, it compares the sequence watermark within the relevant domain. Transaction positions retain their database-specific format in reader updates and statistics. (#6222.)

MariaDB positions can be learned from successful server responses that contain transaction tracking information. When tracking is requested through mysql-default_session_track_gtids=OWN_GTID or by the client, ProxySQL adds MariaDB's last_gtid tracking while preserving other tracked variables. It does not send an extra blocking query to discover the write position. The integration uses binlog reader 2.5.0. (#6275, #6228.)

This routing still depends on correctly configured tracking and replica-progress information. MySQL routing for a tracked single-UUID set uses its highest transaction ID and assumes transactions are applied in commit order; it does not establish complete set containment for out-of-order or multi-UUID replication. (#6461.)

Keep freshness-sensitive queries out of the text-query cache: a cache hit can return an existing TTL-cached result without waiting for the required transaction or replication-lag condition.

Subnet matching in query rules

Routing policies frequently apply to a service network or a group of clients rather than to one IP address. Query rules can now use CIDR network prefixes in client_addr and proxy_addr, avoiding a separate rule for every address in the subnet.

The implementation supports IPv4, IPv6, and normalized IPv4-mapped addresses. Existing literal-address matching continues to work. (#6223, #6259.)

Queued MySQL commands

Some clients send the next command before reading the preceding response. ProxySQL now queues complete commands and executes them in order, including prepared execution and COM_PING. It pauses further input when queued commands or pending output need to be drained. Applications receive responses in the same order as their requests. (#6470, #6511.)

Entering permanent replication forwarding while commands remain queued is rejected by closing that client connection. This prevents already-received commands from being stranded during the transition. (#6579.)

PostgreSQL authentication with stored credentials

Deployments that manage PostgreSQL password verifiers can now use supported SCRAM-SHA-256 verifiers or PostgreSQL md5 secrets in addition to cleartext credentials. This lets credential-management workflows retain the server's stored representation where the authentication path supports it. (#5865.)

The configured authentication policy still applies. The default pgsql-authentication_method=3 requires SCRAM and rejects MD5 credentials. Using an MD5 secret requires policy level 1 or 2 and an MD5 challenge from the backend. SCRAM pass-through requires successful SCRAM authentication from the application and a byte-identical verifier, including its salt, on each backend that user reaches.

Query-rule selection of permanent forwarding

A MySQL query rule can now request a transition to permanent fast-forward mode with the Boolean attribute {"switch_to_fast_forward":true}. This lets routing policy select connections that should subsequently use direct forwarding.

The transition applies to a normal text query using the final selected hostgroup. If the client's protocol state cannot safely be carried into forwarding, the transition is rejected and the client connection is closed. This includes compressed connections, requests that cannot be reconstructed, and connections with another command already queued. Mirror and prepared commands do not consume this action. (#6156, #6440.)

Bug Fixes

MySQL retries, prepared statements, and session state

Prevent replay of partially answered batches. If a backend becomes unavailable after the application has received an earlier result from a multi-statement batch, ProxySQL now fails the unfinished batch rather than sending the entire batch to another backend. Earlier statements therefore cannot run a second time through that retry path. Failures before any result has reached the application can still follow the normal retry policy. (#6554.)

Preserve transaction ownership after errors. Failed prepared execution with autocommit=0 retains the connection's transaction state, so a subsequent ROLLBACK reaches the backend holding that transaction. Prepared-execution packets and bind buffers are also released correctly on local responses, early failures, and retries. (#6482, #6259, #6407.)

Handle session changes as complete statements. Tracking of SET LOCAL assignments and transaction characteristics no longer applies only part of a statement. Unsupported or incomplete assignments follow the backend path without partially changing ProxySQL's tracked state. (#6405, #6441, #6470.)

Return large prepared results correctly. Binary result rows spanning MySQL's packet-size boundary now handle continuation headers and the final empty packet required for exact size multiples. Workers also refresh their heartbeat during large result generation. (#6444, #6511.)

PostgreSQL transactions and prepared statements

Recover transactions without aborting the proxy. Rollback, session-setting changes, and RESET ALL preserve backend-confirmed state. A disagreement between ProxySQL's tracker and the backend no longer aborts the process. Protocol errors inside a transaction retain PostgreSQL's aborted-transaction behavior until recovery completes. (#6161, #6442.)

Keep prepared statements consistent with their session. Prepared-statement identities now account for search_path, the setting that determines which schemas PostgreSQL searches. Changing schemas or encountering a changed result type can therefore trigger the appropriate preparation rather than reusing an incompatible backend statement. Statement deallocation also preserves backend ownership and failed-transaction behavior. (#6401, #6112.)

Preserve result formats and cursor ownership. Mixed per-column result formats are forwarded correctly. Cursors declared with WITH HOLD, which remain open after commit, keep their backend connection rather than allowing another pooled session to inherit that state. Cursor cleanup releases the connection when appropriate. (#6259, #6401.)

Report connection and protocol failures safely. A disconnect during a result or an invalid backend reply retires the affected connection and returns an error instead of aborting ProxySQL. PostgreSQL Admin responses use the correct wire framing, and unsupported Admin/STATS request batches leave the connection synchronized for later queries. (#6111, #6204, #6373.)

GTID routing and connection reuse

Replica progress must describe the current connection, not an earlier reader session. Reader reconnects now clear stale transaction knowledge; malformed or ambiguous positions and oversized updates no longer leave an old position available for routing. Writer fallback is decided before the query is attached to its backend. (#6444, #6461, #6470.)

Backend connection-age limits are enforced for pooled and busy connections at the appropriate release or disconnect boundary. PostgreSQL monitoring resumes correctly after being disabled and re-enabled at runtime, and backend connection attempts can try the resolved addresses of a hostname. (#6198, #6259, #6390, #6442.)

Memory safety, TLS, and shutdown

Query-cache construction now checks sizes and allocation results, including multi-result responses that could previously exceed their allocated buffer. Packet and authentication bounds checks are covered in the security-advisory section below. (#6310.)

TLS writes correctly account for plaintext already consumed when encrypted output needs a retry, preventing duplicated bytes aft...

Read more

dependency-artifact-v1-openssl-d9f669a85c54a9b0073a0b23c6eea8a1add402ff7a5fa758579493577e180e27

Choose a tag to compare

@github-actions github-actions released this 31 Oct 20:58
4af39ae

Verified dependency bundle for d9f669a85c54a9b0073a0b23c6eea8a1add402ff7a5fa758579493577e180e27.

dependency-artifact-v1-openssl-d65f89f68a09c13838d30fb33a008cb15c458ffdeb692643e5484988dd13400e

Choose a tag to compare

@github-actions github-actions released this 31 Oct 20:58
4af39ae

Verified dependency bundle for d65f89f68a09c13838d30fb33a008cb15c458ffdeb692643e5484988dd13400e.

dependency-artifact-v1-openssl-b355651af3482843c44152b4d8ccf8af5916cb526143003902029267bc4cd424

Choose a tag to compare

@github-actions github-actions released this 31 Oct 20:59
4af39ae

Verified dependency bundle for b355651af3482843c44152b4d8ccf8af5916cb526143003902029267bc4cd424.

dependency-artifact-v1-openssl-6bb257d1b16543f75693742761b3bba9b61293d06b7930f4b03dcb9182ba481d

Choose a tag to compare

@github-actions github-actions released this 31 Oct 20:59
4af39ae

Verified dependency bundle for 6bb257d1b16543f75693742761b3bba9b61293d06b7930f4b03dcb9182ba481d.