What's Changed
- chore: be slightly more defensive when checking if the pool is full @samaross
- fix: correctly quote empty parameter values
- fix: respect prepared_statements setting when rewriting queries
- fix: parameter (
SET) json encoding - fix: out-of-sync connections leaking into the pool @jbielick
- fix: recompute the parameters hash when the params are cleared by
RESET@LexVar - refactor: move rewrite engine into its own module under the parser and make it run independently
- feat: support binary encoding for multi-tuple insert statements splitting
- feat: multi-tuple inserts use whatever protocol the original insert was sent with instead of rewriting them into simple queries
- feat: generate unique IDs with
pgdog.unique_id()function call anywhere in a query - refactor: query AST is attached to the request, ensuring it's available to all parts of the parser/rewrite engine
- fix: ambiguous shard key detection refactored into a priority heap, allowing the parser to evaluate multiple conditions and select the highest priority one; added granular debugging to check where a shard route came from
- feat: support
SET [LOCAL] pgdog.shardandSET [LOCAL] pgdog.sharding_keyin and out of transactions, following Postgres semantics - feat: add
rewritecolumn toSHOW PREPAREDto show actual statements executed on the server - feat: keep rewritten statements in the prepared cache to avoid churn
- refactor: much more granular errors for different not-connected states
- refactor: change some methods that return boolean to use
is_prefix - chore: add quite a bit of test coverage, especially around schema-based sharding
- refactor: re-build parameter sharding hints for each request, avoiding stale state in the query engine
- chore: attribute message input/output in trace logs to each server
- chore: created
QueryParserTestandTestClientstructs to simplify testing those complex components - fix: parsing
BIGINTsharding keys in simple queries that exceeded thatINTEGERrange (2.2B) - feat: handle
SETcommands completely inside the proxy, not sending them to a server even if using extended protocol - fix: query comments-based sharding hints being ignored when schema sharding was used
- fix: dedup shard numbers in
Shard::Multibinding - chore: remove a lot of dead code
New Contributors
- @samaross made their first contribution in #675
- @jbielick made their first contribution in #668
- @LexVar made their first contribution in #682
Full Changelog: v0.1.18...v0.1.19