You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(db): keep the PostgreSQL volume name stable across major upgrades
Reverts the postgresql-data-v18 rename from #1627 before it ships in a
release. A PostgreSQL 18 container pointed at PostgreSQL 17 data fails
loudly (the image entrypoint refuses to start), which is strictly safer
than the rename's silent healthy-but-empty stack; stable volume names
are the Compose norm, and a version-suffixed name forces a rename at
every future major. The upgrade drill now rehearses the stable-name
flow (dump, destroy the volume, fresh PostgreSQL 18 init, restore) and
proves the loud-refusal property; the operator runbook and ADR 0038 are
amended to match.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
**Operators:** the PostgreSQL Compose volume keeps its stable `postgresql-data` name across the 17 → 18 upgrade instead of moving to a version-suffixed `postgresql-data-v18`. This corrects the PostgreSQL 18 qualification shipping in this same release, so no deployed instance ever sees the `-v18` name. The upgrade is dump, remove the volume, restore into the freshly initialized PostgreSQL 18 cluster; a PostgreSQL 18 container started against un-migrated PostgreSQL 17 data refuses to start instead of coming up empty.
|`.env`|`/opt/hephaestus/docker/self-host/.env`|**Equal priority.** Its encryption keys protect values inside the database backup. Without them, provider credentials and signing material are unreadable. |
16
16
| TLS certificates |`./letsencrypt/`| Optional — Let's Encrypt re-issues on first boot (rate limits permitting). |
17
17
| Context Fabric |`git-repos` volume | Back up when replayable evidence is required. Skipping it discards repository clones and bounded replay/CAS content; durable job provenance remains in PostgreSQL, but the exact source bytes may be unrecoverable. |
@@ -57,13 +57,22 @@ timestamp.
57
57
58
58
## PostgreSQL 17 to 18
59
59
60
-
PostgreSQL major-version data directories are not binary compatible. The PostgreSQL 18 image stores
61
-
`PGDATA` under `/var/lib/postgresql/18/docker`.
62
-
Do **not** point the PostgreSQL 18 container at the old PostgreSQL 17 volume and do not delete the
63
-
old volume until the restored instance passes verification.
60
+
PostgreSQL major-version data directories are not binary compatible, and the PostgreSQL 18 image
61
+
stores `PGDATA` under `/var/lib/postgresql/18/docker`. The Compose volume keeps its stable
62
+
`postgresql-data` name across the upgrade, so the move is: dump, destroy the volume, let
63
+
PostgreSQL 18 initialize a fresh empty cluster under the same name, restore.
64
64
65
-
From the PostgreSQL 17 release, stop application writes, make a logical dump, and record the exact
66
-
Compose volume name:
65
+
Skipping the procedure fails loudly, not silently: a PostgreSQL 18 container attached to the volume
66
+
still holding PostgreSQL 17 data refuses to start (the entrypoint reports the old data and exits),
67
+
so nothing is lost by starting the new release too early — the container just stays down until the
68
+
steps below are completed.
69
+
70
+
**Step (c) destroys the PostgreSQL 17 data.** From that point on, the dump is the only copy. Do not
71
+
remove the volume before the dump has passed `pg_restore --list`, and copy the dump (and its
72
+
checksum) off the host first.
73
+
74
+
**(a)** From the running PostgreSQL 17 release, stop application writes and take a verified
0 commit comments