While updating PostgreSQL server, pkg gives this warning: =========== BACKUP YOUR DATA! ============= As always, backup your data before upgrading. If the upgrade leads to a higher minor revision (e.g. 8.3.x -> 8.4), a dump and restore of all databases is required. This is *NOT* done by the port! =========================================== The official PostgreSQL documentation says the opposite, actually. "Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number. For example, version 10.1 is compatible with version 10.0 and version 10.6. [...] To update between compatible versions, you simply replace the executables while the server is down and restart the server. The data directory remains unchanged — minor upgrades are that simple." (cfr. https://www.postgresql.org/docs/11/upgrading.html) From the same page: "Current PostgreSQL version numbers consist of a major and a minor version number. For example, in the version number 10.1, the 10 is the major version number and the 1 is the minor version number, meaning this would be the first minor release of the major release 10. For releases before PostgreSQL version 10.0, version numbers consist of three numbers, for example, 9.5.3. In those cases, the major version consists of the first two digit groups of the version number, e.g., 9.5, and the minor version is the third number, e.g., 3, meaning this would be the third minor release of the major release 9.5." A backup advice is always a good idea, but the provided information may not be completely correct anymore, since version 10.0.
Thanks. I'll fix the text to be more correct! Palle
Is it confirmed the same advice (dump/restore only required across major versions) applies to all currently supported postgresql port versions?
(In reply to Kubilay Kocak from comment #2) Moving between two major versions is the same as to moving between two different ports. For example, moving from 9.6 -> 10 or from 10 -> 11 are considered moving between two different major versions. When moving between two major versions, a dump+restore or pg_upgrade is required. pg_upgrade is not easily done using the current FreeBSD port framework for postgresql, since it needs both versions installed during the migration. It is on the TODO list to refactor this.
(In reply to Palle Girgensohn from comment #3) To make it completely clear, postgresql changed their versioning scheme when version 10 was released. The current supported MAJOR versions are 9.4 9.5 9.6 10 11 Before version 10, X.Y was considered a major version. With the introduction of version 10, X is considered the major version. This aligns better with popular expectations.
A commit references this bug: Author: girgen Date: Sun May 17 20:37:12 UTC 2020 New revision: 535676 URL: https://svnweb.freebsd.org/changeset/ports/535676 Log: The PostgreSQL Global Development Group has released an update to all supported versions of our database system, including 12.3, 11.8, 10.13, 9.6.18, and 9.5.22. This release fixes one security issue found in the PostgreSQL server and over 75 bugs reported over the last three months. Please plan to update at your earliest convenience. Update the backup warning text. [1] Add plpython and plperl libs for hstore, jsonb and ltree for the versions where they exist. These libs are added to the postgresql??-plpython and -plperl ports, inspired by [2]. PR: 237910 [1], 245246 [2] Submitted by: Francesco [1], Lo?c Bartoletti [2] Changes: head/databases/postgresql10-plperl/Makefile head/databases/postgresql10-plpython/Makefile head/databases/postgresql10-server/Makefile head/databases/postgresql10-server/distinfo head/databases/postgresql10-server/pkg-plist-plperl head/databases/postgresql10-server/pkg-plist-plpython head/databases/postgresql10-server/pkg-plist-server head/databases/postgresql11-server/Makefile head/databases/postgresql11-server/distinfo head/databases/postgresql11-server/pkg-plist-plperl head/databases/postgresql11-server/pkg-plist-plpython head/databases/postgresql11-server/pkg-plist-server head/databases/postgresql12-plperl/Makefile head/databases/postgresql12-plpython/Makefile head/databases/postgresql12-server/Makefile head/databases/postgresql12-server/distinfo head/databases/postgresql12-server/pkg-install-server head/databases/postgresql12-server/pkg-plist-client head/databases/postgresql12-server/pkg-plist-plperl head/databases/postgresql12-server/pkg-plist-plpython head/databases/postgresql12-server/pkg-plist-server head/databases/postgresql94-plpython/Makefile head/databases/postgresql95-plperl/Makefile head/databases/postgresql95-plpython/Makefile head/databases/postgresql95-server/Makefile head/databases/postgresql95-server/distinfo head/databases/postgresql95-server/pkg-plist-plperl head/databases/postgresql95-server/pkg-plist-plpython head/databases/postgresql95-server/pkg-plist-server head/databases/postgresql96-plperl/Makefile head/databases/postgresql96-plpython/Makefile head/databases/postgresql96-server/Makefile head/databases/postgresql96-server/distinfo head/databases/postgresql96-server/pkg-plist-plperl head/databases/postgresql96-server/pkg-plist-plpython head/databases/postgresql96-server/pkg-plist-server
Committed. Thanks!