I just upgraded a PostgreSQL 13 server to version 15 via pg_dumpall (which as already said is IMHO the only sane way...).
You can basically follow the PostgreSQL documentation 1:1 for that:
Downtime including the import of the 2GB dump was less than 4 minutes according to zabbix.
I could have also cloned the jail (or set up a new one) and prepared the PostgreSQL 15 server there and then used something like
You can basically follow the PostgreSQL documentation 1:1 for that:
Code:
# su -l postgres -c "pg_dumpall > /var/db/postgres/2024-08-07_9:22.dump"
# service postgresql stop
# pkg install postgresql15-server
# service postgresql initdb
# cp -a /var/db/postgresql/data13/pg_hba.conf /var/db/postgresql/data15/
# cp -a /var/db/postgresql/data13/postgresql.conf /var/db/postgresql/data15/
# su -l postgres -c "psql -d postgres -f /var/db/postgres/2024-08-07_9:22.dump"
Downtime including the import of the 2GB dump was less than 4 minutes according to zabbix.
I could have also cloned the jail (or set up a new one) and prepared the PostgreSQL 15 server there and then used something like
nc -l a.b.c.d 666| pqsl -d postgres
on the 15 jail and pg_dumpall | nc a.b.c.d 666
on the old jail to directly send and import the dump into the new installation, but if I couldn't afford such a minimal downtime on that database I'd run a cluster.