Loading howto/upgrades/bookworm.md +16 −6 Original line number Diff line number Diff line Loading @@ -259,14 +259,24 @@ PostgreSQL is special and needs to be upgraded manually. export LC_ALL=C.UTF-8 && printf "about to stop and destroy cluster main on postgresql-15, press enter to continue" && read _ && port15=$(grep ^port /etc/postgresql/15/main/postgresql.conf | sed 's/port.*= //;s/[[:space:]].*$//') if psql -P $port15 --no-align --tuples-only \ -c "SELECT datname FROM pg_database WHERE datistemplate = false and datname != 'postgres';" \ | grep .; then echo "ERROR: database cluster 15 not empty" else pg_dropcluster --stop 15 main && pg_upgradecluster -m upgrade -k 13 main && for cluster in `ls /etc/postgresql/13/`; do mv /etc/postgresql/13/$cluster/conf.d/* /etc/postgresql/15/$cluster/conf.d/ done fi Yes, that implies DESTROYING the *NEW* version but the point is we then recreate it with the old one. then recreate it from the old one. TODO: this whole procedure needs to be moved into fabric, for sanity. 4. change the cluster target in the backup system, in `tor-puppet`, for example: Loading Loading
howto/upgrades/bookworm.md +16 −6 Original line number Diff line number Diff line Loading @@ -259,14 +259,24 @@ PostgreSQL is special and needs to be upgraded manually. export LC_ALL=C.UTF-8 && printf "about to stop and destroy cluster main on postgresql-15, press enter to continue" && read _ && port15=$(grep ^port /etc/postgresql/15/main/postgresql.conf | sed 's/port.*= //;s/[[:space:]].*$//') if psql -P $port15 --no-align --tuples-only \ -c "SELECT datname FROM pg_database WHERE datistemplate = false and datname != 'postgres';" \ | grep .; then echo "ERROR: database cluster 15 not empty" else pg_dropcluster --stop 15 main && pg_upgradecluster -m upgrade -k 13 main && for cluster in `ls /etc/postgresql/13/`; do mv /etc/postgresql/13/$cluster/conf.d/* /etc/postgresql/15/$cluster/conf.d/ done fi Yes, that implies DESTROYING the *NEW* version but the point is we then recreate it with the old one. then recreate it from the old one. TODO: this whole procedure needs to be moved into fabric, for sanity. 4. change the cluster target in the backup system, in `tor-puppet`, for example: Loading