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
SetupFDWby @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_txGUC by @EinKrebs #3066 - Honor the
default_commit_strategyrouter 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
MultiShardServerby @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
EXECUTEby @reshke #3108 - Fix
PREPAREsyntax 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
VALUESlocations for query rewriting by @reshke #3109 #3111
Console, Migrations & Shard Management
- Implement migration journal commands by @Denchick #3065
- Support
SELECT * FROM <target>as aSHOWalias in the console by @reshke #3073 - Report error cursor positions for console parse errors by @reshke #3061
- Add
__spqr__run_recheck_hostsvirtual function by @reshke #3074 - Validate hosts in
CREATE SHARDandspqr-router test-configby @EinKrebs #3100 - Sort key ranges by lower bound in descending order in
spqrdumpby @EinKrebs #3107
Monitoring & Error Reporting
- Add connection acquisition and reuse metrics to the virtual database by @reshke #3040
- Fix upper-bound handling in
spqr-monitorby @EinKrebs #3048 - Use the simple query protocol by default in
spqr-monitor checkby @EinKrebs #3049 - Fix long query logging by @reshke #3062
- Improve error messages, including errors in
ClusteredCoored.ExecNoTran, by @EinKrebs #3028 #3034
Documentation & CLI
- Document
IF [NOT] EXISTSby @Denchick #3013 - Add a README for
spqr-monitorby @Denchick #3046 - Fix documentation and examples to create key ranges in descending order by @Denchick #3103
- Remove the nonexistent
runsubcommand from coordinator usage text by @tyza66 #3101
Tests & Code Quality
- Upgrade feature tests to pgx/v5 by @reshke #3059
- Verify that the router safely rejects malformed
Qmessage payloads by @reshke #3063 - Fix the flaky
tsa_5nodetest 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
errcheckby @reshke #3093
Dependencies & CI
- Bump
go.etcd.io/etcd/client/v3from 3.7.1 to 3.7.2 by @dependabot[bot] #3038 - Update
github/codeql-actionfrom 4.38.1 to 4.39.0 by @dependabot[bot] #3039 #3087 #3096 - Bump
golang.org/x/cryptofrom 0.57.0 to 0.58.0 by @dependabot[bot] #3086 - Bump
github.com/sethvargo/go-retryfrom 0.4.0 to 0.5.0 by @dependabot[bot] #3077 - Bump
github.com/prometheus/client_golangfrom 1.24.1 to 1.25.0 by @dependabot[bot] #3085 - Bump
github.com/go-ldap/ldap/v3from 3.4.14 to 3.4.15 by @dependabot[bot] #3095 - Bump
github.com/docker/go-connectionsfrom 0.8.1 to 0.8.2 by @dependabot[bot] #3084
New Contributors
Full Changelog: 3.1.1...3.2.0