Date: Tue, 22 Sep 2020 19:57:07 +0000 (UTC) From: Kevin Bowling <kbowling@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r549629 - head Message-ID: <202009221957.08MJv7f2059753@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kbowling Date: Tue Sep 22 19:57:07 2020 New Revision: 549629 URL: https://svnweb.freebsd.org/changeset/ports/549629 Log: Add an UPDATING entry for PostgreSQL default version change to 12 PR: 248657 Reported by: tz Sponsored by: BBOX.io Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Sep 22 19:50:49 2020 (r549628) +++ head/UPDATING Tue Sep 22 19:57:07 2020 (r549629) @@ -5,6 +5,62 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20200921: + AFFECTS: users of database/postgresql* and other software using PostgreSQL to run + AUTHOR: kbowling@FreeBSD.org + + The default version of PostgreSQL has been switched from 11 to 12. + The upgrade procedure can use up twice the space the databases + currently needs. If you have a big amount of stored data take a + closer look at the manpage of pg_upgrade for avoidance and/or + speedup of the upgrade. + + The upgrade instructions consider a basic usage and do not match + complex scenarios like replication, sharding, or similar. + + Upgrade instructions: + + First stop your PostgreSQL, create PostgreSQL-binaries and backup your data. + If you have another Version of PostgreSQL installed, for example 11.9, your + files are named according to this. + + # service postgresql stop + # pkg create postgresql11-server postgresql11-contrib + # mkdir /tmp/pg-upgrade + # tar xf postgresql11-server-11.9.txz -C /tmp/pg-upgrade + # tar xf postgresql11-contrib-11.9.txz -C /tmp/pg-upgrade + # pkg delete -f databases/postgresql11-server databases/postgresql11-contrib databases/postgresql11-client + + Now update PostgreSQL: + + pkg user: + # pkg install databases/postgresql12-server databases/postgresql12-contrib + # pkg upgrade + + Portmaster users: + # portmaster databases/postgresql12-server databases/postgresql12-contrib + # portmaster -a + + Portupgrade users: + # portinstall databases/postgresql12-server databases/postgresql12-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/data12 -U postgres" + # su -l postgres -c "pg_upgrade -b /tmp/pg-upgrade/usr/local/bin/ -d /var/db/postgres/data11/ -B /usr/local/bin/ -D /var/db/postgres/data12/ -U postgres " + + Now the migration is finished. You can start PostgreSQL again with: + + # service postgresql start + + ATTENTION: + 1) The default user changed from "pgsql" to "postgres" in 11. The migration steps above now assume + the "postgres" database user and FreeBSD user. + 2) See the updating entry 20190829 if you are updating from a release prior to 11. + 3) If you use non-default initdb options, you have to adjust the initdb-command accordingly + 20200918: AFFECTS: users of mail/thunderbird AUTHOR: cmt@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009221957.08MJv7f2059753>