aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2023-09-08 18:20:55 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2023-09-08 18:20:55 +0000
commit0c0bf56482b394740f5c14326ae1586158813129 (patch)
tree080e3cfc73a39cb30396fa886219098847c5205b
parenta3727749f7d3bae98a0ab72d672c890cbf73c7a5 (diff)
downloadports-0c0bf56482b394740f5c14326ae1586158813129.tar.gz
ports-0c0bf56482b394740f5c14326ae1586158813129.zip
Mk/bsd.default-versions.mk: Update to PostgreSQL 15
PR: 273058 Exp-run by: antoine
-rw-r--r--Mk/bsd.default-versions.mk2
-rw-r--r--UPDATING56
2 files changed, 57 insertions, 1 deletions
diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
index 2a02ff95704f..5780cfe7c374 100644
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -125,7 +125,7 @@ _EXPORTED_VARS+= _PERL5_FROM_BIN
PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R}
. endif
# Possible values: 11, 12, 13, 14, 15
-PGSQL_DEFAULT?= 13
+PGSQL_DEFAULT?= 15
# Possible values: 8.0, 8.1, 8.2, 8.3
PHP_DEFAULT?= 8.1
# Possible values: rust, legacy
diff --git a/UPDATING b/UPDATING
index 20f526787b7f..154adaceb34a 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.
+20230908:
+ AFFECTS: users of databases/postgresql* and other software using PostgreSQL to run
+ AUTHOR: kbowling@FreeBSD.org
+
+ The default version of PostgreSQL has been switched from 13 to 15.
+ 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 13, your
+ files are named according to this.
+
+ # 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
+
+ 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
+
20230906:
AUTHOR: jrm@FreeBSD.org
AFFECTS: users of sysutils/devcpu-data*