Re: git: 0c0bf56482b3 - main - Mk/bsd.default-versions.mk: Update to PostgreSQL 15
Date: Sat, 09 Sep 2023 06:12:39 UTC
Dear Kevin, Am 08.09.2023 um 21:22 schrieb Kevin Bowling: > + # service postgresql stop > + # pkg create postgresql13-server postgresql13-contrib > + # mkdir /tmp/pg-upgrade > + # tar xf postgresql13-server-13.12.pkg -C /tmp/pg-upgrade > + # tar xf postgresql13-contrib-13.12.pkg -C /tmp/pg-upgrade > + # pkg delete -f databases/postgresql13-server databases/postgresql13-contrib databases/postgresql13-client > + > + Now update PostgreSQL: > + > + pkg user: > + # pkg install databases/postgresql15-server databases/postgresql15-contrib > + # pkg upgrade > + > + Portmaster users: > + # portmaster databases/postgresql15-server databases/postgresql15-contrib > + # portmaster -a > + > + Portupgrade users: > + # portinstall databases/postgresql15-server databases/postgresql15-contrib > + # portupgrade -a > + > + After installing the new PostgreSQL version you need to convert > + all your databases to new version: > + > + # su -l postgres -c "/usr/local/bin/initdb --encoding=utf-8 --lc-collate=C -D /var/db/postgres/data15 -U postgres" > + # su -l postgres -c "pg_upgrade -b/tmp/pg-upgrade/usr/local/bin/ -d/var/db/postgres/data13/ -B /usr/local/bin/ -D /var/db/postgres/data15/ -U postgres " > + > + Now the migration is finished. You can start PostgreSQL again with: > + > + # service postgresql start thanks a lot for your work and this really nice instructions. Should we maybe add this line to the postgres upgrade documentation? /usr/local/bin/vacuumdb -U postgres --all --analyze-in-stages Gruß Matthias -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook