svn commit: r549629 - head
Kevin Bowling
kbowling at FreeBSD.org
Tue Sep 22 19:57:08 UTC 2020
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 at 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 at FreeBSD.org
More information about the svn-ports-head
mailing list