mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
The DR drill in job 95883448699 could not restore the BBB instance from its own backup: baudolo-restore aborted on CREATE UNLOGGED TABLE public."user", whose GENERATED columns call public.immutable_lower_unaccent(). BBB defines that function with an unqualified unaccent() in its body, and pg_dumpall has replayed with search_path='' since PostgreSQL 10 (CVE-2018-1058). Postgres inlines the body while building the generated column, unaccent stops resolving, and ON_ERROR_STOP kills the whole replay. The fallout was two red tests from one defect: the drill left the stack down (subjects are left down), so the svc-db-openldap CLI test five minutes later found its container gone and failed its bind. A SET clause stops Postgres from inlining the function, so the body runs with its own resolved path and the empty search_path no longer reaches it. pg_dump carries the clause into the next dump, which is what makes the backup restorable. Reproduced and verified against postgres:17-alpine: proconfig empty before, 'search_path=public, pg_catalog' after, and the same GENERATED DDL then succeeds under search_path='' with 'Ärger' still folding to 'arger'. The SQL file is the single spot for the logic. Its DO block is a no-op in the postgres database, so the same file first yields the database list and then patches each one - one task, one retry, no SQL in the playbook. The function is upstream BBB schema, absent from this repo, so patching it after deploy is the only lever we have. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>