github pg-sharding/spqr 3.2.0

2 hours ago

We are excited to announce SPQR 3.2.0!

This release introduces spqrmigrate, a new migration tool for SPQR, alongside migration journal commands, safer reference table synchronization, SQL execution improvements, stronger transaction and connection handling, and better monitoring and diagnostics.

This release covers all changes from 3.1.1 to 3.2.0.

What's Changed

spqrmigrate

  • Introduce spqrmigrate, a new tool for managing database migrations in SPQR.

Reference Relations & Data Transfer

  • Use a temporary function in SetupFDW by @EinKrebs #3036
  • Check relation existence on the destination shard before synchronizing a reference table by @EinKrebs #3042
  • Create foreign servers and user mappings within a transaction by @EinKrebs #3043
  • Check reference relation dependencies before synchronization by @EinKrebs #3051
  • Await PIDs during reference relation synchronization by @EinKrebs #3072
  • Wait for prepared transactions to commit or roll back during data transfers by @EinKrebs #3104

Transactions & Connection Handling

  • Add __spqr__autonomous_tx GUC by @EinKrebs #3066
  • Honor the default_commit_strategy router configuration option by @reshke #3105
  • Fix the order of connection state cleanup actions by @reshke #3053
  • Clean up the server on unexpected transaction state during unroute by @EinKrebs #3068
  • Fix panic when operating on an uninitialized shard server by @diPhantxm #3027
  • Fix shard removal from MultiShardServer by @diPhantxm #3088

Query Routing & SQL Execution

  • Skip router-side postprocessing for queries involving only reference relations by @reshke #3052
  • Support non-string constants in SQL-level EXECUTE by @reshke #3108
  • Fix PREPARE syntax errors when the statement name matches a relation or function name by @Denchick #3106
  • Fix binary format handling for single-parameter queries targeting reference tables by @diPhantxm #3110
  • Refactor INSERT rewriting and use lyx VALUES locations for query rewriting by @reshke #3109 #3111

Console, Migrations & Shard Management

  • Implement migration journal commands by @Denchick #3065
  • Support SELECT * FROM <target> as a SHOW alias in the console by @reshke #3073
  • Report error cursor positions for console parse errors by @reshke #3061
  • Add __spqr__run_recheck_hosts virtual function by @reshke #3074
  • Validate hosts in CREATE SHARD and spqr-router test-config by @EinKrebs #3100
  • Sort key ranges by lower bound in descending order in spqrdump by @EinKrebs #3107

Monitoring & Error Reporting

  • Add connection acquisition and reuse metrics to the virtual database by @reshke #3040
  • Fix upper-bound handling in spqr-monitor by @EinKrebs #3048
  • Use the simple query protocol by default in spqr-monitor check by @EinKrebs #3049
  • Fix long query logging by @reshke #3062
  • Improve error messages, including errors in ClusteredCoored.ExecNoTran, by @EinKrebs #3028 #3034

Documentation & CLI

Tests & Code Quality

  • Upgrade feature tests to pgx/v5 by @reshke #3059
  • Verify that the router safely rejects malformed Q message payloads by @reshke #3063
  • Fix the flaky tsa_5node test by filtering nondeterministic cache entries by @Denchick #3069
  • Add regression tests for host rechecks by @reshke #3075
  • Fix a typo in router configuration code by @EinKrebs #3064
  • Check error-channel receives to satisfy errcheck by @reshke #3093

Dependencies & CI

New Contributors

Full Changelog: 3.1.1...3.2.0

Don't miss a new spqr release

NewReleases is sending notifications on new releases.