aboutsummaryrefslogtreecommitdiff
path: root/UPDATING
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2020-09-22 19:57:07 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2020-09-22 19:57:07 +0000
commit9b844386c0e21f1f696099efb9d4c2c8291ef9a9 (patch)
treeea001ff822ca741e8eeaa4d267c597fe36958ec0 /UPDATING
parent4f11bf7999b7096a82770667f1d59ea9e4bc7f0d (diff)
downloadports-9b844386c0e21f1f696099efb9d4c2c8291ef9a9.tar.gz
ports-9b844386c0e21f1f696099efb9d4c2c8291ef9a9.zip
Add an UPDATING entry for PostgreSQL default version change to 12
PR: 248657 Reported by: tz Sponsored by: BBOX.io
Notes
Notes: svn path=/head/; revision=549629
Diffstat (limited to 'UPDATING')
-rw-r--r--UPDATING56
1 files changed, 56 insertions, 0 deletions
diff --git a/UPDATING b/UPDATING
index 15ae716f42e2..78595284ff81 100644
--- a/UPDATING
+++ b/UPDATING
@@ -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