Skip to content

Releases: pg-sharding/spqr

3.1.0

Choose a tag to compare

@Denchick Denchick released this 28 Aug 08:08
Immutable release. Only release title and notes can be modified.
d555565

We are excited to announce SPQR 3.1.0!

This release focuses on production operations and reliability: improved redistribution tooling and recovery, connection pinning and PostgreSQL advisory lock support, stronger two-phase commit recovery, new key range management commands, extended protocol improvements, and better observability.

This release covers all changes from 3.0.0 to 3.1.0.

What's Changed

Data Redistribution & Recovery

Key Range & Shard Management

Advisory Locks & Connection Pinning

Two-Phase Commit (2PC)

  • Add __spqr__allow_autoprotect_2pc GUC by @reshke #2641
  • Improve transaction deployment error reporting by @reshke #2671
  • Add deployment context to transaction utilities by @reshke #2694
  • Improve 2PC recovery logic by @reshke #2865 #2866
  • Remove two-phase metadata for successfully reverted transactions by @reshke #2909
  • Remove transaction metadata for successfully committed 2PC transactions with eager cleanup by @reshke #2921
  • Add eager 2PC cleanup GUC and tests by @reshke #2920
  • Add transaction listing methods and extended two-phase transaction SHOW target by @reshke #2922
  • Optionally persist only 2PC transaction data in MemQDB by @EinKrebs #2924
  • Allow the 2PC watchdog to work without a backend rule by @EinKrebs #2925
  • Use compare-and-swap for transaction status changes by @EinKrebs #2926

Query Routing & Execution

  • Support in-router aggregate functions by @reshke #2754
  • Add default read-only transaction support by @reshke #2842
  • Add SPQR EXECUTE HOST FILTER by @reshke #2905
  • Fix query cancellation in multishard queries by @reshke #2703
  • Match catalog queries case-insensitively by @reshke #2732
  • Try already acquired routes for route-oblivious plans by @reshke #2930
  • Fix command tag handling for reference relation modifications by @reshke #2762

Extended Protocol & Portals

  • Invalidate portal description cache on parse by @reshke #2645
  • Fix multiple portal execution iterations with non-zero MaxRows by @reshke #2680
  • Fix portal suspension hazards for single-shard queries by @reshke #2682
  • Fix slice description for multi-slice virtual plans by @reshke #2779
  • Support extended protocol during query analysis by @reshke #2833
  • Support ParseComplete in xproto message copy by @reshke #2885
  • Fix dummy prepared statement parameter substitution by @reshke #2919
  • Hash parameter OIDs in prepared statement names by @reshke #2933
  • Fix INT2 bind parameter parsing and named portal binds by @reshke #2940

Console & SQL

  • Implement generic string GUCs by @reshke #2663
  • Add log_query router configuration option by @reshke #2702
  • Fix spqr-console handling of empty queries by @reshke #2791
  • Reject invalid UNITE KEY RANGE ALL / SPLIT KEY RANGE ALL commands by @reshke #2808
  • Improve console grammar and reject additional invalid SQL by @reshke #2798 #2814
  • Make SPQR_DEFAULT_ROUTE_BEHAVIOUR a generic string GUC by @reshke #2818
  • Make preferred execution engine a generic GUC by @reshke #2820
  • Add assign hooks for generic GUCs by @reshke #2826
  • Make SPQR_REPLY_NOTICE a generic GUC by @reshke #2836
  • Make __spqr__sharding_key a generic GUC by @reshke #2844
  • Make maintenance parameters generic GUCs by @reshke #2918
  • Make SHOW notice message format configurable through GUC by @reshke #2908

Monitoring & Observability

Configuration, Security & Networking

  • Add gRPC TLS configuration types and credential adapter by @Denchick #2748
  • Configure TSA recheck frequency through dbpool_tsa_recheck_period by @reshke #2849
  • Properly implement TSA checker timeouts by @reshke #2853
  • Do not hold pool lock while checking connections for TSA match by @reshke #2665
  • Redact secrets in configuration output by @Denchick #2845
  • Remove invalid pool settings from backend rules by @Denchick #2900
  • Add validation for empty shard on client connection by @Denchick #2726

Stability & Correctness

Documentation & CI

Full Changelog: 3.0.0...3.1.0

3.0.0

Choose a tag to compare

@Denchick Denchick released this 19 Jun 08:25
Immutable release. Only release title and notes can be modified.
ea161ee

We are excited to announce SPQR 3.0.0! All the goals outlined in the SPQR 3.0 Roadmap have been implemented — distributed and reference tables, distributed query support, and two-phase commit for DDL/migrations across shards.

There are no breaking changes between 2.9.x and 3.0.0. We are simply opening a new chapter for SPQR and moving forward.

This release covers all changes from 2.9.9 to 3.0.0, including intermediate patch releases: 2.9.10, 2.9.11, 2.9.12

What's Changed

JOIN Routing & CTE Support

  • Fix JOIN ON clause routing and add tests by @reshke #2365
  • Move tuple routing logic to separate function and add test for JOIN by @reshke #2408
  • Support LEFT and RIGHT join with aux-values multishard by @reshke #2409
  • Fix JOIN adjust logic & add tests by @reshke #2466
  • Support JOIN CTE adjust for transitive aux values routing by @reshke #2467
  • Support multiple AUX CTE with one common ancestor for JOIN adjust by @reshke #2468
  • Fix CTE alias referencing by @reshke #2415
  • Fix relation alias resolve and add regress test by @reshke #2543

Extended Protocol & Multi-Portal

  • Partially support multi-portal binding by @reshke #2519
  • Stub implementation for portal suspension by @reshke #2522
  • Use ProcessOneMsgCarefully for Describe by @reshke #2442
  • Remove custom processing in Execute by @reshke #2443
  • Fix pgproto message copy for simple query & parse by @reshke #2492
  • Greasify protocol negotiation in startup processing by @reshke #2608
  • Respect result format code in virtual pg_is_in_recovery() by @reshke #2517

Two-Phase Commit (2PC)

Implicit Transactions

Auto-Linearize for Multi-Shard DML

  • Auto-linearize hazard multi-shard upserts by @reshke #2512
  • Fix auto-linearize on INSERT INTO .. RETURNING by @reshke #2527
  • Reimplement dispatch linearize as plan hinting rather than GUC injection by @reshke #2560
  • Support correct command complete tag in multishard UPDATE by @reshke #2618 #2622
  • Fix multishard insert command complete tag by @reshke #2626

Data Transfer & Balancer

  • Allow context cancellation for data transfer workers by @reshke #2386
  • Allow to cancel data transfer task in any execution phase by @reshke #2390
  • Cancel data move task only on IMMEDIATE flag by @reshke #2456
  • Recheck key range status for in-flight data chunk by @reshke #2569
  • GUCify in-flight data access option by @reshke #2571
  • Do not perform parallel transactions on both shards in copyData by @EinKrebs #2627
  • Trace all data transfer goroutines in coordinator by @reshke #2385

Metadata & Key Range Management

Console & SQL Enhancements

Monitoring & Observability

spqr-monitor

Shard Management & Networking

Error Reporting

  • Modernize coding around error reporting by @reshke #2372
  • Switch errComplexQuery to use spqrerror infrastructure by @reshke #2414
  • Use SPQR-specific error format for general error report by @reshke #2433
  • Report key range id as errdetail by @reshke #2423
  • Set QUERY field in SPQR-specific error for simple proto by @reshke #2535

Configuration

  • Support UUID HASH column type in distributions by @Denchick #2588
  • Support disabling idle_in_transaction_session_timeout by @EinKrebs #2617
  • Support no-op distribution column update by @reshke #2621
  • Cache schema in relay and share between executions by @reshke #2524

Stability & Panic Fixes

Code Quality & Linting

Tests

Documentation

DevOps & CI

New Contributors

Full Changelog: 2.9.9...3.0.0

2.9.9

Choose a tag to compare

@reshke reshke released this 23 Apr 05:41
Immutable release. Only release title and notes can be modified.
2c5da8b

This is one of final release before 3.0.0 target.

Changes include experimental post processing support, 2pc improvements, QDB in pg initial support, JOIN routing fixes, SQL level prepared queries support and much more.

What's Changed

Read more

2.9.0

Choose a tag to compare

@Denchick Denchick released this 22 Dec 12:24
Immutable release. Only release title and notes can be modified.
134d61e

What's Changed

Engine V2, Planner & Execution

Reference Relations & Distributed DML

  • Refactor rewrite query support for reference relation modification by @reshke (#1752)
  • Add test for reference relation sync by @EinKrebs (#1762)
  • Support returning clause for UPDATE of reference relations by @reshke (#1766)
  • Support distributed relation batch insert by @reshke (#1786)
  • DROP SEQUENCE ... CASCADE by @diPhantxm (#1788)
  • Correct reference table locks in spqrguard regress test by @EinKrebs (#1833)
  • Prevent reference relation modification on sync by @EinKrebs (#1836)
  • Rewrite spqrguard interaction to support 2.0 by @EinKrebs (#1855)

Transactions & 2PC

Networking

  • Refactor proxying requests to control-plane from regular connections by @reshke (#1767)
  • Cache router gRPC connections in coordinator by @Denchick (#1787)
  • Add gRPC keep-alive settings to coordinator by @Denchick (#1792)
  • JSON logging by default in coordinator by @cypny (#1807)
  • Check TCP connection aliveness and add client pool watchdog by @reshke (#1814, #1834)
  • Fix TCP aliveness check using TCP_INFO by @Denchick (#1852)
  • Fix panic on un-attached client by @reshke (#1831)

Console, SHOW & Routing Semantics

Balancer, Shards & Key Ranges

Tests, Stability & Fixes

Docs

Other

New Contributors

Full Changelog: 2.8.0...2.9.0

2.8.0

Choose a tag to compare

@Denchick Denchick released this 04 Nov 15:33
Immutable release. Only release title and notes can be modified.
4a8f6af

What's Changed

Reference & Replicated Relations

  • Add replicated relations to constraints check and ignore nonexistent ones by @EinKrebs #1556 #1567
  • Change ALTER RELATION semantics by @EinKrebs #1557
  • Do not fail on schema-qualified reference relations by @reshke #1571
  • Show column sequence mapping in SHOW reference_relations by @reshke #1598
  • Fix describe for xproto+ref relation autoinc by @reshke #1620
  • Add schema information to reference tables in QDB by @EinKrebs #1645
  • Explicit selection of columns in copyReferenceTable data by @EinKrebs #1647
  • Support router-coord proxy for drop reference relations by @reshke #1603
  • Add sequence starting values to bootstrap by @reshke #1599

Planner, Analyzer & Execution Refactoring

  • Move all analyze logic to planner module and refactor query planning by @reshke #1653 #1682
  • Split planning and parameters binding in planqueryv1 @reshke #1670
  • Analyze CTE before top-level query and fix analysis for NOT expressions @reshke #1672 #1673
  • Refactor planner v1 virtual func logic, add support for virtual func in engine v2 @reshke #1601 #1602
  • Make EXPLAIN actually work @reshke #1683

Balancer & Move Task Improvements

Query Rewrite & Virtual Processing

  • Properly implement query rewrite feature by @reshke #1609
  • Support virtual processing for SPQR metadata in regular connections by @reshke #1678
  • Support virtual function hosts in engine v2 by @reshke #1684

Console & CLI Enhancements

Stability, Fixes & Cleanup

Performance & Connection Handling

  • Introduce priority-based host selection logic by @reshke #1588
  • Add connection allocation time to SHOW backend_connections @reshke #1559
  • Eagerly erase stale hosts from running pool @reshke #1563

DevOps & Infrastructure

New Contributors

Full Changelog: 2.7.0...2.8.0

2.7.0

Choose a tag to compare

@Denchick Denchick released this 12 Sep 07:34
eac9972

What's Changed

Features

REDISTRIBUTE & MOVE KEY RANGE

  • Better warning message for MOVE KEY RANGE. by @Denchick in #1503
  • Add hashed column move feature test by @EinKrebs in #1520
  • Support city-hashed columns in key range moves by @EinKrebs in #1522
  • Remove excessive use of WithPrefix in etcd queries by @EinKrebs in #1537
  • Write move task IDs separately from move task group by @EinKrebs in #1546
  • Add etcd max request size param to coordinator config by @EinKrebs in #1547
  • Add UUID column type processing to 'REDISTRIBUTE KEY RANGE' command by @EinKrebs in #1551
  • Defer constraints on key range move by @EinKrebs in #1555

Fixes, Tests, Documentation

New Contributors

Full Changelog: 2.6.7...2.7.0

2.6.0

Choose a tag to compare

@Denchick Denchick released this 23 May 17:34
adebe24

What's Changed

Features

Multi-column sharding feature

  • prepation for coluticolumn routing support in copy by @reshke in #1113
  • Support multi-column copy processing by @reshke in #1115
  • Direct routing for inserts, multicolumn logic support back. by @reshke in #1106
  • Add multicoulmn routing with different types by @reshke in #1116

Better balancing

Better routing

  • Use no-check-routing-rules optimization for single-shard setups by @reshke in #1162
  • Refactor comment parse processing and set TSA aliases by @reshke in #1166
  • Bump lyx by @reshke in #1182 (TODO)
  • Add reset support for spqr tsa param by @reshke in #1180
  • Support for res target by @reshke in #1183
  • Throw error when failed getting schema cache by @EinKrebs in #1188
  • Add POC version of read-only-to-replica feature check facility by @reshke in #1193
  • Route read-only to replicas by @reshke in #1195 // smart-read-write

Virtual processing

  • Virtual processing preparational patch. Support sub-select correcly. by @reshke in #1126
  • pg_is_in_recovery virtual processing by @reshke in #1132
  • Select 1 virtual proc by @reshke in #1174
  • test for spqr virtual param processing and fixes by @reshke in #1178
  • Fix for pure virtual processing by @reshke in #1181
  • Fix bind processing of preudo commands by @reshke in #1198
  • Fix virtual param transaction bound handling by @reshke in #1191

Fixes, Tests, Documentation

New Contributors

Full Changelog: 2.5.0...2.6.0

2.5.0

Choose a tag to compare

@Denchick Denchick released this 20 Mar 15:30
a073b2e

What's Changed

Features

Roles support

Fixes, Tests, Documentation

Full Changelog: 2.4.0...2.5.0

2.4.0

Choose a tag to compare

@Denchick Denchick released this 17 Feb 15:49
3889778

What's Changed

Features

Engine v2

  • Little code tweak by @reshke in #978
  • Small refactoring around begin tx logic by @reshke in #979
  • Simplify relay internals. by @reshke in #980
  • Small refactoring around ProcessExtendedBuffer by @reshke in #984
  • Add test & fix virtual TX command status reporting by @reshke in #985
  • Small prelimitary refactorings by @reshke in #989
  • Refactor relay-queryExecutor. Remove complete relay param. by @reshke in #990
  • Move txmanagement code into executor by @reshke in #996
  • Transfer setup & teardown copy statement aux functions to executor by @reshke in #999
  • Complete relay fixes. untoute client even on deploy errors. by @reshke in #1004
  • Add tx with error test by @reshke in #1005
  • Multishard tx processing in Engine V2 by @reshke in #1000
  • Update router: enable engine v2 regression test by @reshke in #1008
  • Remove ExpRoute from CopyState by @reshke in #1013
  • Bump golang.org/x/crypto from 0.32.0 to 0.33.0 by @dependabot in #1014
  • Remove RouteCB method from PoolMgr by @reshke in #1017
  • Remove function UnrouteRoutes by @reshke in #1018
  • Refactor routing internals by @reshke in #1019
  • Skip subplan routing instead of error by @reshke in #1020
  • Refactor relay internals by @reshke in #1021
  • Update relay.go: remove unreachable code by @reshke in #1023
  • Expand transaction with __spqr__engine_v2 Part one by @reshke in #1022
  • Expand transaction part2 by @reshke in #1024
  • Encapsulate query params into one struct by @reshke in #1025
  • Execute expanded transaction query on specified execution targets by @reshke in #1026
  • Fix partial execution multishard sync state by @reshke in #1027

Fixes, tests, other

New Contributors

Full Changelog: 2.3.0...2.4.0

2.3.0

Choose a tag to compare

@Denchick Denchick released this 27 Jan 17:22
d3397c5

What's Changed

Reference relations

Debug features

Engine v2

  • Engine v2 support for reference relation modification by @reshke in #946
  • One step towards engine v2 by @reshke in #950
  • Support engine v2 distributed relation sql. Refactor internals by @reshke in #951
  • Add error param to engine V2 planner. Remove DummyPlan. by @reshke in #955
  • Refactor. Unite MultiShardState with Scatter plan by @reshke in #956
  • Import ddl logic from Planner V1 into engine V2 by @reshke in #971
  • Futher split Qrouter logic into reusable parts by @reshke in #973
  • Futher refactor proxy routing logic by @reshke in #975

Fixes, Tests, Documentation

Other

Full Changelog: 2.2.0...2.3.0