Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Mar 2026 03:34:19 +0000
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b3067b15e58e - main - Mk/bsd.default-versions.mk: Update to PostgreSQL 18
Message-ID:  <69a5053b.25adb.28baec05@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b3067b15e58e432938a6e9a07809b1ecea4c4cb6

commit b3067b15e58e432938a6e9a07809b1ecea4c4cb6
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-03-02 03:03:51 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-03-02 03:08:32 +0000

    Mk/bsd.default-versions.mk: Update to PostgreSQL 18
    
    See UPDATING for upgrade advice
    
    PR:             291156
    Approved by:    antoine (exp-run)
---
 Mk/bsd.default-versions.mk |  2 +-
 UPDATING                   | 53 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
index 64f701c3b6bb..8e0863c82044 100644
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -135,7 +135,7 @@ _EXPORTED_VARS+=	_PERL5_FROM_BIN
 PERL5_DEFAULT:=		${_PERL5_FROM_BIN:R}
 .  endif
 # Possible values: 13, 14, 15, 16, 17, 18
-PGSQL_DEFAULT?=		17
+PGSQL_DEFAULT?=		18
 # Possible values: 8.2, 8.3, 8.4, 8.5
 PHP_DEFAULT?=		8.4
 # Possible values: rust, legacy
diff --git a/UPDATING b/UPDATING
index ac86db9bc3e9..21c698069ec8 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,59 @@ 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.
 
+20260301:
+  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 17 to 18.
+  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 17, your
+  files are named according to this.
+
+  # service postgresql stop
+  # pkg create postgresql17-server postgresql17-contrib
+  # mkdir /tmp/pg-upgrade
+  # tar xf postgresql17-server-17.9.pkg -C /tmp/pg-upgrade
+  # tar xf postgresql17-contrib-17.9.pkg -C /tmp/pg-upgrade
+  # pkg delete -f databases/postgresql17-server databases/postgresql17-contrib databases/postgresql17-client
+
+  Now update PostgreSQL:
+
+    pkg user:
+    # pkg install databases/postgresql18-server databases/postgresql18-contrib
+    # pkg upgrade
+
+    Portmaster users:
+    # portmaster databases/postgresql18-server databases/postgresql18-contrib
+    # portmaster -a
+
+    Portupgrade users:
+    # portinstall databases/postgresql18-server databases/postgresql18-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/data18 -U postgres"
+  # su -l postgres -c "pg_upgrade -b /tmp/pg-upgrade/usr/local/bin/ -d /var/db/postgres/data17/ -B /usr/local/bin/ -D /var/db/postgres/data18/ -U postgres "
+
+  Now the migration is finished. You can start PostgreSQL again with:
+
+  # service postgresql start
+
+  ATTENTION:
+  1) If you use non-default initdb options, you have to adjust the initdb-command accordingly
+
 20260226:
   AFFECTS: users of sysutils/symon
   AUTHOR: jamie@catflap.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69a5053b.25adb.28baec05>