From nobody Sun Oct 24 00:03:30 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 226AF1803793; Sun, 24 Oct 2021 00:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HcJFt6zfDz3l2j; Sun, 24 Oct 2021 00:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D0657342B; Sun, 24 Oct 2021 00:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19O03UcW077823; Sun, 24 Oct 2021 00:03:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19O03Uev077822; Sun, 24 Oct 2021 00:03:30 GMT (envelope-from git) Date: Sun, 24 Oct 2021 00:03:30 GMT Message-Id: <202110240003.19O03Uev077822@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kevin Bowling Subject: git: 51a00e6b9497 - main - Mk/bsd.default-versions.mk: Update to PostgreSQL 13 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51a00e6b949724d82679085d672d3dc4df6b67bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/ports/commit/?id=51a00e6b949724d82679085d672d3dc4df6b67bf commit 51a00e6b949724d82679085d672d3dc4df6b67bf Author: Kevin Bowling AuthorDate: 2021-10-23 23:42:29 +0000 Commit: Kevin Bowling CommitDate: 2021-10-23 23:42:29 +0000 Mk/bsd.default-versions.mk: Update to PostgreSQL 13 PR: 258792 Reviewed by: girgen (pgsql@) Exp-run by: antoine --- Mk/bsd.default-versions.mk | 4 ++-- UPDATING | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index cbb84537697f..1dff8bce1d94 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -105,8 +105,8 @@ _PERL5_FROM_BIN!= ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;' _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} .endif -# Possible values: 9.6, 10, 11, 12, 13 -PGSQL_DEFAULT?= 12 +# Possible values: 9.6, 10, 11, 12, 13, 14 +PGSQL_DEFAULT?= 13 # Possible values: 7.3, 7.4, 8.0 PHP_DEFAULT?= 7.4 # Possible values: 2.7, 3.6, 3.7, 3.8, 3.9, 3.10 diff --git a/UPDATING b/UPDATING index 540154150e82..f4c84f17bc8b 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. +20211024: + 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 12 to 13. + 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 12.8, your + files are named according to this. + + # service postgresql stop + # pkg create postgresql12-server postgresql12-contrib + # mkdir /tmp/pg-upgrade + # tar xf postgresql12-server-12.8.txz -C /tmp/pg-upgrade + # tar xf postgresql12-contrib-12.8.txz -C /tmp/pg-upgrade + # pkg delete -f databases/postgresql12-server databases/postgresql12-contrib databases/postgresql12-client + + Now update PostgreSQL: + + pkg user: + # pkg install databases/postgresql13-server databases/postgresql13-contrib + # pkg upgrade + + Portmaster users: + # portmaster databases/postgresql13-server databases/postgresql13-contrib + # portmaster -a + + Portupgrade users: + # portinstall databases/postgresql13-server databases/postgresql13-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/data13 -U postgres" + # su -l postgres -c "pg_upgrade -b /tmp/pg-upgrade/usr/local/bin/ -d /var/db/postgres/data12/ -B /usr/local/bin/ -D /var/db/postgres/data13/ -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 + 20211023: AFFECTS: users of www/node AUTHOR: bhughes@FreeBSD.org