I upgraded docker manager from my default site. After upgrade I got the message to do launcher rebuild app. Which I did. I got message in there that post gres is updated run rebuild again. Which I did. But my default site is working as expected but the second site lost everything. It is not a fresh instance. But it got only one system post welcome.
What I did is changed postgres_data to postgres_data_brocken and data_old to postgres_data and tried rebuilding it again got same response for postgres upgrade from 15 to 18 and to rebuild app. But with same results. Please help
sudo du -sh shared/standalone/postgres_data_old
678M shared/standalone/postgres_data_old
❯ sudo du -sh shared/standalone/postgres_data_brocken
412M shared/standalone/postgres_data
_brocken
So i have checked the postgres template file. It is targeting only one db. Which is insane. It should have looped through the databases present and changed them. I leaving this here for anybody looking for a solution in this scenario
DB_LIST=$(su postgres -c "/usr/lib/postgresql/${PG_MAJOR_OLD}/bin/psql -p 5432 -tAc \"select datname from pg_database where not datistemplate and datname != 'postgres'\"")
for DB in $DB_LIST; do
su postgres -c "/usr/lib/postgresql/${PG_MAJOR_OLD}/bin/pg_dump -Fd -j$(nproc --ignore=1) \"$DB\" -f /shared/postgres_dump/\"$DB\""
done