mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-06 10:57:26 +00:00
The Rust backend prepares and caches statements per connection. DDL that changes a cached statement's result type, such as a schema delta applied during a rolling restart, makes Postgres reject the stale plan with SQLSTATE 0A000. Inside a transaction that error used to propagate as a plain DatabaseError, which `new_transaction` does not retry, so other workers saw transient failures until their caches turned over. The cursor already drops the cached entry before the error propagates, so treating 0A000 like a deadlock means the retried transaction prepares a fresh plan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ULdieJyQoHNzeHq42H2M1p