Compare commits
base: recipe-maintainers/discourse:fix-pg-migration-idempotent
recipe-maintainers/discourse:main
recipe-maintainers/discourse:upgrade-c10c04c
recipe-maintainers/discourse:fix-redis-host
recipe-maintainers/discourse:discourse-official
recipe-maintainers/discourse:discourse-official-image
recipe-maintainers/discourse:fix-pg-migration-idempotent
recipe-maintainers/discourse:ci/bitnamilegacy-repin
recipe-maintainers/discourse:renovate/configure
recipe-maintainers/discourse:cas_readme
recipe-maintainers/discourse:1.1.0+2026.7.1
recipe-maintainers/discourse:1.0.0+3.5.3
recipe-maintainers/discourse:0.8.1+3.5.0
recipe-maintainers/discourse:0.8.0+3.5.0
recipe-maintainers/discourse:0.7.0+3.3.1
recipe-maintainers/discourse:0.6.3+3.1.2
recipe-maintainers/discourse:0.6.2+3.1.1
recipe-maintainers/discourse:0.6.1+3.1.1
recipe-maintainers/discourse:0.6.0+3.1.1
recipe-maintainers/discourse:0.5.0+3.0.6
recipe-maintainers/discourse:0.4.1+3.0.6
recipe-maintainers/discourse:0.4.0+3.0.1
recipe-maintainers/discourse:0.3.1+2.8.9
recipe-maintainers/discourse:0.3.0+2.8.9
recipe-maintainers/discourse:0.2.1+2.8.9
recipe-maintainers/discourse:0.2.0+2.8.1
recipe-maintainers/discourse:0.1.0+2.7.7
..
compare: recipe-maintainers/discourse:6ae2d2cf517e83d03fd7650fa0f01e53a676b0b4
recipe-maintainers/discourse:main
recipe-maintainers/discourse:upgrade-c10c04c
recipe-maintainers/discourse:fix-redis-host
recipe-maintainers/discourse:discourse-official
recipe-maintainers/discourse:discourse-official-image
recipe-maintainers/discourse:fix-pg-migration-idempotent
recipe-maintainers/discourse:ci/bitnamilegacy-repin
recipe-maintainers/discourse:renovate/configure
recipe-maintainers/discourse:cas_readme
recipe-maintainers/discourse:1.1.0+2026.7.1
recipe-maintainers/discourse:1.0.0+3.5.3
recipe-maintainers/discourse:0.8.1+3.5.0
recipe-maintainers/discourse:0.8.0+3.5.0
recipe-maintainers/discourse:0.7.0+3.3.1
recipe-maintainers/discourse:0.6.3+3.1.2
recipe-maintainers/discourse:0.6.2+3.1.1
recipe-maintainers/discourse:0.6.1+3.1.1
recipe-maintainers/discourse:0.6.0+3.1.1
recipe-maintainers/discourse:0.5.0+3.0.6
recipe-maintainers/discourse:0.4.1+3.0.6
recipe-maintainers/discourse:0.4.0+3.0.1
recipe-maintainers/discourse:0.3.1+2.8.9
recipe-maintainers/discourse:0.3.0+2.8.9
recipe-maintainers/discourse:0.2.1+2.8.9
recipe-maintainers/discourse:0.2.0+2.8.1
recipe-maintainers/discourse:0.1.0+2.7.7
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6ae2d2cf51 |
fix(db): make the postgres major-version migration safe and correct
The in-place pg_upgrade in the db entrypoint could crash-loop or fail on real clusters. This reworks it: - Idempotent, crash-safe: replace the fragile migration_in_progress marker with a state-driven guard on the old_data/new_data scratch dirs. An empty leftover means a run was interrupted before any data moved (data still intact at $PGDATA) so it is discarded and retried; a non-empty one means data may live only there, so it stops for manual recovery. Removes both the "mkdir: File exists" crash-loop and the silent fresh-initdb-over-live-data window. - Correct install user: pg_upgrade must run as the old cluster's bootstrap superuser (oid 10), and the new cluster must be initialised with that same user. It is not necessarily $POSTGRES_USER (clusters created with the default "postgres" superuser plus a separate app role are common). Detect it from the old cluster (briefly start it and read pg_roles where oid = 10) and use it for both the new cluster's initdb and the pg_upgrade -U argument. - Bump DB_ENTRYPOINT_VERSION to v3 so swarm reloads the (immutable) config. Verified on cctest: clean 13->17, interrupted-then-retried, and prod-like clusters whose install user is "postgres" with a separate "discourse" app role. |