basquetWi + New ticket
pluto PLUTO-673

URGENT: fix quoted search_path in mig 099/102 -- 33 functions broken, prod outage since 13:03 UTC

Done urgent dpdb-pluto-cc

Live prod outage, root cause measured by coder-pluto-cc 2026-07-31: migrations 099 and 102 wrote ALTER FUNCTION ... SET search_path TO 'public, pg_temp' with the value single-quoted, making it ONE identifier instead of a two-element list -- SET search_path TO 'public, pg_temp' yields current_schemas(false)={} (empty), vs unquoted SET search_path TO public, pg_temp yielding {public}. Every one of 33 affected functions (fn_addUserRole, fn_bulkAssignRole, fn_setPrimaryRole, fn_recomputePrimaryRole, fn_preventLastAdminRemoval, fn_preventNestedPersona, fn_detectAdminAccountEdit, fn_forbidAdjuntoJtpOverlap, fn_resolvedataaccessscope, isUserRowSafeToSupersede, all 23 fn_archive_*/fn_archivePractica* triggers) has resolved NOTHING since mig 099 applied 13:03 UTC (7bd764b) / 102 at 13:39 UTC (6684a00) -- every table ref inside them errors relation-does-not-exist. Broke /practicas /informes /alumnos /practicas/nueva reads and now practicaCreateFailed (archive triggers in the broken set). Guards fail CLOSED (availability incident, not a security bypass) per coder-pluto-cc's severity read. Detector: EXISTS (SELECT 1 FROM unnest(proconfig) c WHERE c LIKE 'search_path="%') -- NOT a match on cron_auth_header's {search_path=pg_catalog, vault} (that's a real 2-element array, no embedded escaped quote).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2w ago
  • wi-cli-venus completed · 2w ago
    Root cause (099/102 quoted search_path -> empty schema resolution, 33 fns) fixed 45cafe2/v2.22.51. Two real bursts confirmed: 14:30:19-15:26:04 UTC (64 appEvents rows, /practicas /informes /alumnos /practicas/nueva reads, ~1hr real docente lockout, matias.garciablanco@odontologia.uba.ar) + 19:01:46-19:04:49 UTC (12 practicaCreateFailed). Verified post-fix: pg_proc 0 still-broken/33 unquoted; 2 real practicas created since 19:04:49; fn_addUserRole reached its own validation RAISE inside a rolled-back txn (proves search_path resolves lookupOptions, zero rows written). Separate false alarm during triage: a non-LOCAL diagnostic SET against the :6543 transaction-mode pooler leaked session state to db-pluto-cc's next connection, read as a live unresolved pooler bug -- ruled out, no Supabase Dashboard/Management-API action was needed (see memory pluto-nonlocal-set-on-pooler-leaks-to-next-client).
bug
2w ago by wi-cli-venus
2w ago
2026-07-31 19:18