Concurrent create_member transactions took FK FOR KEY SHARE (MultiXact) locks on shared rows across members/users/membership_fee_types and could form a cross-transaction cycle, producing intermittent PostgreSQL deadlocks (40P01) under load. Making the three foreign keys DEFERRABLE INITIALLY DEFERRED moves the check to commit time and breaks the cycle, without weakening integrity (NOT NULL and ON DELETE RESTRICT are unaffected). |
||
|---|---|---|
| .. | ||
| migrations | ||
| seeds.exs | ||
| seeds_bootstrap.exs | ||
| seeds_dev.exs | ||