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
- "`statement_timeout` is 0, so a long migration is never cut off" was
absolute, and `0076_damp_vector.sql` disproves it — it sets 180s locally.
It is the session default now, with the override named.
- The migration-log command hard-coded the production Compose file, so a
source-built or Ollama install would have inspected the wrong stack.
- The Compose rollback applied `SIM_VERSION` to every install, but the local
and Ollama stacks build from source and ignore it. Those now get the
checkout-and-rebuild path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015BwsJTEQRzWJaY4BRCkPZt
| `lock_timeout` on the migration session | 5 seconds for ordinary DDL — a statement that waits longer fails with SQLSTATE `55P03`. An individual migration can set it to `0` for statements that must not be interrupted, such as `CREATE INDEX CONCURRENTLY`. `statement_timeout` is `0` on the same session, so a long migration is never cut off once it holds its locks |
106
+
| `lock_timeout` on the migration session | 5 seconds for ordinary DDL — a statement that waits longer fails with SQLSTATE `55P03`. An individual migration can set it to `0` for statements that must not be interrupted, such as `CREATE INDEX CONCURRENTLY`. `statement_timeout` is `0` on the same session by default, so a long migration is not cut off once it holds its locks — though a migration can narrow it for its own statements, as `0076_damp_vector.sql` does with a 180-second local setting |
107
107
| SQL migration retry attempts | 8, with exponential backoff and jitter, and only for a lock timeout (`55P03`). Script (data) migrations run once — a failure there exits immediately |
108
108
| Connection attempts at startup | 10, for transient failures — `53300` (`too_many_connections`), `53400`, the `08xxx` connection-exception class, and socket-level errors such as `ECONNREFUSED`, `ECONNRESET`, `ETIMEDOUT`, `EHOSTUNREACH`, and `ENOTFOUND`. A database that is simply down is retried with backoff, not failed immediately |
#Docker Compose — edit .env so the pin persists, then restart.
268
+
#Production Compose — edit .env so the pin persists, then restart.
266
269
# Substitute the previous release tag from the releases page.
267
270
echo"SIM_VERSION=<previous-release-tag>">> .env
268
271
docker compose -f docker-compose.prod.yml up -d
269
272
```
270
273
274
+
The local and Ollama stacks build the app from source and ignore `SIM_VERSION`, so roll those back by checking out the previous tag and rebuilding with the file — and, for the Ollama stack, the profile — that started the install:
275
+
276
+
```bash
277
+
git checkout <previous-release-tag>
278
+
docker compose -f docker-compose.local.yml up -d --build
279
+
```
280
+
271
281
**Rollback after a schema change** requires restoring the database to the pre-upgrade backup, because migrations are forward-only:
0 commit comments