Jose_C_Gomez encountered an upgrade failure on Ubuntu 16 due to an unsupported Docker version after attempting a web-based Discourse upgrade. pfaffman advised against rolling back and suggested migrating to a new VM instead. After upgrading Ubuntu to 20 and manually installing Docker 28, Jose_C_Gomez successfully upgraded PostgreSQL from 13 to 15, but hit a missing column error (require_message in the flags table) during rebuild. To resolve it, he disabled all plugins, rebuilt the app, entered the Rails console via ./launcher enter app, and manually added the column with: ALTER TABLE flags ADD COLUMN require_message BOOLEAN DEFAULT FALSE;. After re-enabling plugins and rebuilding again, the app started successfully. pfaffman praised the fix and noted that running an EOL OS (Ubuntu 16) made quick upgrades impossible. Jose_C_Gomez acknowledged the lesson learned and plans to migrate to a fresh droplet. The root cause was outdated infrastructure — Ubuntu 16 no longer supporting modern Docker — which the web upgrade script didn’t validate. This was a complex, manual recovery involving OS, Docker, PostgreSQL, and schema fixes — not a simple one-click upgrade.
I would move to a new vm and restore the database there. It’s easier, had little down time, and if something goes wrong, you just keep using the working server.
I got OS upgraded etc and it went through postgress 15 upgrade but now when I do rebuild app I get
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse ERROR: column "require_message" does not exist at character 72
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse STATEMENT: SELECT id, name, name_key, description, notify_type, auto_action_type, require_message, applies_to, position, enabled, score_type FROM "flags" ORDER BY "flags"."position" ASC
** PLUGIN FAILURE **
You are unable to start Discourse due to this error during plugin
initialization:
PG::UndefinedColumn: ERROR: column "require_message" does not exist
LINE 1: ..._key, description, notify_type, auto_action_type, require_me...
^
After I ran rebuild (post postgress upgrade)
Performing Upgrade
------------------
Analyzing all rows in the new cluster ok
Freezing all rows in the new cluster ok
Deleting files from new pg_xact ok
Copying old pg_xact to new server ok
Setting oldest XID for new cluster ok
Setting next transaction ID and epoch for new cluster ok
Deleting files from new pg_multixact/offsets ok
Copying old pg_multixact/offsets to new server ok
Deleting files from new pg_multixact/members ok
Copying old pg_multixact/members to new server ok
Setting next multixact ID and offset for new cluster ok
Resetting WAL archives ok
Setting frozenxid and minmxid counters in new cluster ok
Restoring global objects in the new cluster ok
Restoring database schemas in the new cluster ok
Copying user relation files ok
Setting next OID for new cluster ok
Sync data directory to disk ok
Creating script to delete old cluster ok
Checking for extension updates notice
Your installation contains extensions that should be updated
with the ALTER EXTENSION command. The file
update_extensions.sql
when executed by psql by the database superuser will update
these extensions.
Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade.
Once you start the new server, consider running:
/usr/lib/postgresql/15/bin/vacuumdb --all --analyze-in-stages
Running this script will delete the old cluster's data files:
./delete_old_cluster.sh
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE
Old 13 database is stored at /shared/postgres_data_old
To complete the upgrade, rebuild again using:
./launcher rebuild app
Anything I can do? I’m not sure how it is missing a column.
I’m not sure how to do that, more specifically to which table etc. Is there some information on that that I can find. I did find that post you mention but there were no specifics.
5.This will upgrade your postgress from 13 to 15 see:
6. Once the Db upgraded successfully ran
./launcher rebuild app
This yielded an error about missing column
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse ERROR: column "require_message" does not exist at character 72
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse STATEMENT: SELECT id, name, name_key, description, notify_type, auto_action_type, require_message, applies_to, position, enabled, score_type FROM "flags" ORDER BY "flags"."position" ASC
** PLUGIN FAILURE **
You are unable to start Discourse due to this error during plugin
initialization:
PG::UndefinedColumn: ERROR: column "require_message" does not exist
LINE 1: ..._key, description, notify_type, auto_action_type, require_me...
^
At this point there is no way to get the container started, so I went to app.yml and disabled all plugins then ran rebuild again
The app finally rebuilt, then I was able to enter the rails console to add the above column manually.
./launcher enter app
rails db
ActiveRecord::Base.connection.execute("ALTER TABLE flags ADD COLUMN require_message BOOLEAN DEFAULT FALSE;")
exit
exit
Once the column was present went back i to app.yml and enabled all plugins and did a rebuild again
Rebuild succeeded … and we are up!
Thank you @pfaffman for your prompt response on the weekend no less. We are going to make a new updated droplet and move over. This was suposed to be a quick inplace upgrade from the web interface. But I guess the script doesn’t test docker compatibility. When it upgraded discourse docker then it threw incompatible docker error.
This was fully our fault for saying in such an old version of Ubunutu 16, one of the good and bad things about a stable system is that it tends to linger.