Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return

ypu may need to scroll up higher. Have you triedvthe safe mode procedure?

Not sure if it will work in this case or not tbh.