# undo case (the load fails) — 2026-09-30T12:50:03+0200
before: PG_VERSION=16 pinned={'outline': 'outlinewiki/outline:1.9.1', 'outline-postgres': 'postgres:16-alpine', 'outline-redis': 'redis:7-alpine'}
    outline: readback of the seeded document http=200 found=True
before: seed reads back through the front door = True
setup: CREATE EXTENSION adminpack -> CREATE EXTENSION
setup: extensions now: adminpack pg_trgm plpgsql unaccent uuid-ossp
control: 18 has no adminpack: 0
  phase +0.0s backing-up | err=None
  phase +15.4s safety-dump | err=None
  phase +17.5s pulling | err=None
  phase +18.5s copying | err=None
  phase +25.7s converting | err=None
  phase +31.8s undoing | err=None
  phase +57.5s undone | err=None
result: {"accepted": true, "http": "202", "duration_s": 57.5, "final_phase": "undone", "update_error": null, "hold_reason": null, "state": "running"}
    outline: readback of the seeded document http=200 found=True
after: PG_VERSION=16 pinned={'outline': 'outlinewiki/outline:1.9.1', 'outline-postgres': 'postgres:16-alpine', 'outline-redis': 'redis:7-alpine'} state=running
after: seed reads back through the front door = True
controller lines:
2026/09/30 10:50:18 update.go:536: [INFO] [stacks] update outline: accepted — guarded update started
2026/09/30 10:50:18 update.go:1365: [INFO] [stacks] update outline: phase checking
2026/09/30 10:50:18 update.go:786: [INFO] [stacks] update outline: ladder — the last step (1 of 1) — the catalog's current definition
2026/09/30 10:50:18 update.go:800: [INFO] [stacks] update outline: this step CONVERTS outline-postgres PostgreSQL 16 → 18 (the ladder entry's mark); database volume outline_outline_postgres_data
2026/09/30 10:50:18 update.go:816: [INFO] [stacks] update outline: no usable copy on any tier — younger than 24h0m0s and not older than this install's deploy (2026-09-30T10:42:23Z) (found: none) — backing up first
2026/09/30 10:50:18 update.go:1365: [INFO] [stacks] update outline: phase backing-up
2026/09/30 10:50:32 update.go:831: [INFO] [stacks] update outline: precondition met after the backup — Tier 2 (second drive) copy from 2026-09-30T10:50:18Z
2026/09/30 10:50:32 update.go:1365: [INFO] [stacks] update outline: phase safety-dump
2026/09/30 10:50:33 update.go:846: [INFO] [stacks] update outline: safety dump done (1 file(s)) [/mnt/sys_drive/felhom-data/backups/primary/outline/db-dumps/pre-restore-20260930T105033Z-outline-postgres.sql]
2026/09/30 10:50:34 undo.go:287: [INFO] [stacks] update outline: the undo copy will hold 3 named volume(s), 65.1 MiB
2026/09/30 10:50:35 pgconvert.go:340: [INFO] [stacks] update outline: conversion space — database volume outline_outline_postgres_data is 65 MB; the dump needs up to 81 MB + the 2 GB floor; 27.7 GB free beside the stack dir
2026/09/30 10:50:35 update.go:1365: [INFO] [stacks] update outline: phase pinning
2026/09/30 10:50:35 pin.go:373: [INFO] [stacks] update outline: pin advanced to /opt/docker/felhom-controller/data/catalog-cache/templates/outline/docker-compose.yml (outline=outlinewiki/outline:1.9.1, outline-postgres=postgres:18-alpine, outline-redis=redis:7-alpine)
2026/09/30 10:50:35 update.go:1365: [INFO] [stacks] update outline: phase pulling
2026/09/30 10:50:36 update.go:1365: [INFO] [stacks] update outline: phase copying
2026/09/30 10:50:42 update.go:1365: [INFO] [stacks] update outline: phase copying
2026/09/30 10:50:42 undo.go:437: [INFO] [stacks] update outline: copied outline_outline_data → outline_outline_data.pre-update-20260930T105042Z in 523ms
2026/09/30 10:50:42 update.go:1365: [INFO] [stacks] update outline: phase copying
2026/09/30 10:50:43 undo.go:437: [INFO] [stacks] update outline: copied outline_outline_postgres_data → outline_outline_postgres_data.pre-update-20260930T105042Z in 732ms
2026/09/30 10:50:43 update.go:1365: [INFO] [stacks] update outline: phase copying
2026/09/30 10:50:43 undo.go:437: [INFO] [stacks] update outline: copied outline_outline_redis_data → outline_outline_redis_data.pre-update-20260930T105042Z in 425ms
2026/09/30 10:50:43 update.go:1365: [INFO] [stacks] update outline: phase converting
2026/09/30 10:50:43 pgconvert.go:423: [INFO] [stacks] update outline: CONVERTING outline-postgres PostgreSQL 16 → 18 (volume outline_outline_postgres_data, kept copy outline_outline_postgres_data.pre-update-20260930T105042Z)
2026/09/30 10:50:45 pgconvert.go:468: [INFO] [stacks] update outline: pg_dumpall from 16 done in 608ms — 125 kB, completion line present; before: 2 database(s), 42 table(s), 312 row(s)
2026/09/30 10:50:45 update.go:1365: [INFO] [stacks] update outline: phase converting
2026/09/30 10:50:46 pgconvert.go:484: [INFO] [stacks] update outline: database volume outline_outline_postgres_data emptied (its copy outline_outline_postgres_data.pre-update-20260930T105042Z holds the old datadir, marker checked twice)
2026/09/30 10:50:49 update.go:1066: [ERROR] [stacks] update outline FAILED after the new version was started: conversion failed: loading the dump into 18: exit status 3 (psql: ERROR:  extension "adminpack" is not available)
2026/09/30 10:50:49 update.go:1058: [INFO] [stacks] update outline: kept 8049 bytes of the app's own log at /opt/docker/stacks/outline/hold-logs/20260930T105049Z/compose-logs.txt before stopping it (R-621)
2026/09/30 10:50:49 update.go:1365: [INFO] [stacks] update outline: phase undoing
2026/09/30 10:50:49 undo.go:515: [WARN] [stacks] update outline: UNDO — putting back the previous version and its 3 volume copy(ies) (reason: conversion failed: loading the dump into 18: exit status 3 (psql: ERROR:  extension "adminpack" is not available))
2026/09/30 10:51:14 unattended.go:511: [INFO] [stacks] update outline: step outline=outlinewiki/outline:1.9.1, outline-postgres=postgres:18-alpine, outline-redis=redis:7-alpine recorded as undone — the automatic leg will not press it again until the catalog's ladder changes (ladder c1eaa565b2a5d069)
2026/09/30 10:51:14 undo.go:640: [INFO] [stacks] update outline: event app_update_undone
2026/09/30 10:51:14 undo.go:568: [INFO] [stacks] update outline: UNDONE in 25s — the previous version is running on the data from before the update (the app's health check passed)

cleanup: DROP EXTENSION adminpack -> DROP EXTENSION
RESULT undo case ok=True final_phase=undone PG_VERSION=16 seed_after=True
