This recommended upgrade failed and didn’t get my forum back up after breaking. I’m running discourse-doctor now to try to fix it, and if that fails too, I took a VM snapshot.
2023-04-19 18:28:31.298 UTC  LOG: received fast shutdown request
2023-04-19 18:28:33.651 UTC  LOG: shutting down
2023-04-19 18:28:33.974 UTC  LOG: database system is shut down
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 59 exit 2>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
bootstrap failed with exit code 2
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
Command exited with non-zero status 1
1.85user 1.84system 3:21.56elapsed 1%CPU (0avgtext+0avgdata 36996maxresident)k
197608inputs+368outputs (1133major+96509minor)pagefaults 0swaps
2023-04-19 18:28:26.755 UTC  LOG: database system was not properly shut down; automatic recovery in progress
If your database can’t stop safely in 60s, which will happen with large DBs with slower disks, it will enter this state and fail a rebuild if it can’t recover in 5s (which is rare since it’s large/slow).
This has nothing to do with the changes listed here, and is a problem in Discourse since at least 2016.
Ahh, thanks. Maybe it should wait longer for larger forums like ours. If you just kill the DB process it’ll need to rollback transactions after being started back up and that can take a very long time.
The terminology re beta is somewhat confusing. The admin dash says we’re running beta, is there somewhere else we should have looked? My understanding is beta is recommended for discourse based on the release announcements discouraging using the stable branch.
Oh that guy just built a completely new two container instance then restored from backup. We definitely aren’t doing that without a good reason, I just had to do it to avoid the PG13 upgrade disk space requirements like 2 months ago.