github readysettech/readyset stable-260331

5 hours ago

Release Notes

Readyset is currently released as a docker container and Linux distro binary packages. For installation with docker, see the Install with Docker documentation. Available Linux distribution binary packages for x86_64/amd64 and arm64/aarch64 include deb package for Ubuntu 22.04, Debian 12 and later, and rpm packages for Amazon Linux 2023 and RedHat 9. See package installation instructions.

What's New

  • 0ee831f: Fixed handling of empty array literals ({}) in PostgreSQL queries that previously caused type mismatch errors.

  • f89952f: EXPLAIN MATERIALIZATIONS now supports the optional FOR CACHE <name> suffix to show only the materialized nodes belonging to a specific cache’s dataflow.

  • f0fe3f4: Readyset now creates shallow caches by default in response to CREATE CACHE statements, allowing users to start caching queries without first setting up replication.

    • If replication is configured, start Readyset with --cache-mode deep or --cache-mode deep-then-shallow to enable deep caching (CACHE_MODE environment variable).
    • You can request a specific cache type using the CREATE [DEEP|SHALLOW] CACHE syntax.
  • d37510d: Added support for the PostgreSQL array overlap operator (&&), which checks whether two arrays share any common elements.

  • 6924e75: Fixed an issue where filters on ROW_NUMBER() results were lost in nested subqueries with identically named window output columns, causing too many rows to be returned.

  • f4e59d1: Fixed a race condition between the WAL flushing thread and the full replay thread.

  • 3867c09: Fixed an out-of-memory issue during replays for queries with fully materialized nodes.

  • d4c33ed: Fixed incorrect results for LEFT JOINs with ON-clause conditions referencing only the left table.

  • 83767d8: Fixed a crash in domain processing when SUM or AVG aggregates were applied to text columns in MySQL mode.

  • ce07ae1: Fixed AVG() decimal precision for integer columns in MySQL.

  • 8f37261: Added support for auto-incrementing columns in PostgreSQL via the GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY syntax.

  • fb31b80: Fixed a panic when json_object_agg was used in queries requiring post-lookup aggregation (e.g., with WHERE IN clauses). These queries now gracefully fall back to the upstream database.

  • 4932860: Improved performance of PostgreSQL array containment operators (@> and <@) from O(n*m) to O(n+m).

  • 9bed07a: Fixed incorrect NULL ordering in PostgreSQL array comparisons. NULL elements are now correctly treated as greater than non-NULL values, matching PostgreSQL semantics.

  • 4bfec7c: Fixed a bug where GROUP BY with numeric column references (e.g., GROUP BY 1) failed inside subqueries.

  • 0e2d46d: Fixed a bug causing column lookup errors during MIR lowering for queries with aggregates inside derived tables (e.g., SELECT * FROM (SELECT max(id), val FROM t GROUP BY 2) AS sub).

  • a8a6425: SHOW PROXIED QUERIES now defaults to displaying proxied queries and their Readyset support status based on the current --cache-mode setting (default: shallow).

    • You can specify a list using the DEEP or SHALLOW modifier, e.g., SHOW PROXIED [DEEP|SHALLOW] QUERIES.
  • 8fb0958: Fixed array_agg on array-typed columns (e.g., ARRAY(SELECT ARRAY[...])), which previously returned Unsupported type errors. It now produces multidimensional arrays matching PostgreSQL behavior.

  • b5bf630: Fixed incorrect results for LEFT JOIN + subquery queries with parameterized WHERE clauses on a right-side non-join column.

  • 7033df7: Added support for VALUES clauses in the FROM position with JOINs, enabling inline literal tables (e.g., SELECT ... FROM (VALUES (1, 'a')) AS v(id, name) JOIN t ON ...).

  • 42bca2b: Fixed a domain thread crash when caching queries with type-mismatched join conditions (e.g., INT joined against group_concat TEXT output that cannot convert to INT).

  • 4689a72: Fixed equality comparison bugs with TIMESTAMP and non-UTC TIMESTAMPTZ cached lookups. Persistent state will be automatically re-snapshotted on upgrade.

  • 968d819: Fixed incorrect results for TIMESTAMP queries with timezone offsets in literals.

  • 3965615: Fixed MySQL DATETIME lookups with timezone offsets in WHERE clauses.

  • f0617bf: Fixed connection tracking to properly handle multiple authenticated users from the same IP address and re-authentication cases. SHOW CONNECTIONS now displays both remote addresses and usernames.

  • 31a08d9: Added a virtual Readyset schema backed by DataFusion, exposing more system state via SQL and virtual relations.

    • The default schema name is readyset, configurable via the --readyset-schema flag or the READYSET_SCHEMA environment variable.
  • 7d4e2e4: Added readyset.shallow_caches virtual relation (vrel) to examine current shallow caches.

  • a77c177: Added readyset.shallow_cache_entries vrel to assist in diagnosing shallow cache entries.

  • 8b668c3: Fixed duplicate column projection handling to prevent debug assertion panics when queries select the same column multiple times.

  • 369f17f: Added the SKIP CACHE hint (/*+ SKIP CACHE */) to bypass Readyset caches and route queries directly to the upstream database.

  • d83cf2f: Added a reason tag to the skip cache metric to distinguish between SKIP CACHE hints, transactions, and proxy-always bypass scenarios.

    • Thank you to @Daksh-10 for the contribution!
  • Readyset now supports MySQL Global Transaction Identifiers (GTIDs) for binlog replication. When the upstream MySQL server has GTID mode enabled, Readyset automatically detects and uses GTID-based positioning instead of traditional binlog file/position tracking. This provides:

    • Automatic GTID detection: Readyset queries the upstream server's gtid_mode variable and switches to GTID-based replication automatically when available.
    • --require-gtid flag: Optionally enforce GTID mode, preventing fallback to binlog file/position if the upstream server has GTIDs disabled.
  • Readyset now supports switching the upstream database source without a full re-snapshot, enabling planned failover scenarios (e.g., promoting a replica or migrating to a new host). Four new SQL commands are available:

    • ALTER READYSET STOP REPLICATION: Pauses the replication stream.
    • ALTER READYSET START REPLICATION: Resumes replication from the last stored position.
    • ALTER READYSET SET REPLICATION POSITION '<pos>': Updates the stored replication position (accepts MySQL binlog file:position, GTID set, or PostgreSQL LSN format).
    • ALTER READYSET CHANGE CDC TO '<url>': Points Readyset at a new upstream database URL.

    A typical failover workflow: stop replication, change the CDC URL to the new source, optionally adjust the replication position, then start replication. This works for both MySQL (binlog file/pos and GTID) and PostgreSQL (LSN) deployments.

  • Added query hint syntax (/*rs+ ... */) for inline cache management. CREATE SHALLOW CACHE hints create a shallow cache on first execution while still executing the query. It also allows for optional settings such as TTL and COALESCE.

Don't miss a new readyset release

NewReleases is sending notifications on new releases.