Bug fixes
- [Breaking] Manual bans are now carried over to new connection pools after
RELOAD. They were previously discarded, allowing traffic to flow through prematurely after configuration reload. Breaking because this changes existing behavior and may require operators to adjust migration scripts to issue a separateUNBANcommand afterRELOAD. @levkk - Schema reload was not triggered on certain DDL statements, e.g.,
CREATE TYPE, which caused incorrectRowDescriptionmessages sent to clients for direct-to-shard and cross-shard queries which touched those new types. @levkk - 2pc WAL checkpointer could cause WAL corruption by removing segments necessary for recovery. Fixed by storing relationships between segments containing data about the same transaction, preventing dependent segments from being removed prematurely. @levkk
- SCRAM authentication could cause DoS because it was moved to background Tokio threads, which were unbounded. Added
background_workerssetting (default 0, disabling this whole feature) to limit that concurrency. Moved SCRAM auth back to the Tokio async worker pool. @levkk - Fix segfault in query normalization (only affected the Enterprise edition) caused by a bug in our parser. Added
pg_raw_parse::normalizeto our regression test suite to prevent recurrences. @levkk - Setting
connection_recoverytodropwould cause connection churn for connection drivers using prepared statements. Fixed by ensuring we don't drop connections in this scenario. @levkk - Disable triggers on destination shards during resharding (by setting
replica_session_roletoreplica). This prevents triggers from running twice and also ensures we can copy tables that use foreign keys and which delete / update relationships during resharding. @meskill - Prevent deadlock in extended protocol pipelines when client sends a
Describeout of specific order @murex971 - Correctly handle omnisharded to sharded joins where the sharding key is present in omnisharded tables @ygxio @levkk
- Connections using
LISTENwould incorrectly handle that command sent via extended protocol (returningReadyForQueryprematurely) @murex971 - When using passthrough auth, reloading the config would not carry over any user-specific settings configured in
users.toml@mehcode - Role detection (
role = "auto") could cause deadlock in pool for read-only clusters that served write transactions (e.g.,BEGIN, notBEGIN READ ONLY) @levkk - Query router wouldn't handle nested typecasts correctly for shard key detection @sgrif
Performance
- Improve performance of resharding copy data phase when using multiple replicas by more fairly distributing workloads between source databases @meskill
Features
- Support
LIMITandOFFSETin cross-shard statements sent viaPREPAREandEXECUTE@jkaczman - Support cross-account RDS IAM authentication by using STS
assume-role@lyupan-cb - Add
total_wait_timeandavg_wait_timeto OpenMetrics (and OTEL) @rimrakhimov - Support Postgres foreign keys during resharding by disabling Postgres triggers during replication. This also ensures that triggers on the destination shards don't run, potentially causing double data insertion. @meskill
- Inject correct time (e.g.
timestamp,timestamptz, etc.) and UUID values in cross-shard and omnishardedINSERTqueries, to make sure the values are identical on all shards. This replaces database-generated defaults without changing the schema. Enable by turning onrewrite.non_deterministic_functions = "rewrite". @jkaczman - Add
checkout_timeoutmetric to OpenMetrics (and OTEL) and admin database (SHOW STATS) which shows how many times clients hit the error for a particular pool @levkk
Code quality
- Fix typo in config example @joshuaharry
- Refactor resharding copy data code to use the tasks API @meskill
- Cleanup of omnisharded table handling during copy data phase @meskill
- Remove redundant check in shard key update flow @sgrif
- CI now uses Postgres 18 (used to be 16) @jkaczman
- Make some tests more deterministic instead of relying on timing @dipeshbabu @ziomarco
New Contributors
- @joshuaharry made their first contribution in #1532
- @lyupan-cb made their first contribution in #1525
- @rimrakhimov made their first contribution in #1528
- @mehcode made their first contribution in #1555
- @dipeshbabu made their first contribution in #1558
- @ziomarco made their first contribution in #1570
Full Changelog: v0.1.58...v0.1.59