On my localhost development I have two ways to get to the database. In common is
cd /var/discourse sudo ./launcher enter app --skip-prereqs
* the --skip-prereqs is because autoclean, autoremove and launcher cleanup fail to clean up enough room for some reason that I haven’t determined yet and I can’t enter app without it.
I can then either
exec rails db
su -c 'psql discourse' postgres
Though there are some obvious differences - the prompt and the exit level - it appears that they are essentially the same.
I would like to know if there are any differences that are not obvious to me. In particular, is one inherently “safer” than the other? Would one trigger / queue jobs and the other not?