| Notes from UPDATING |
- These upgrade notes are taken from /usr/ports/UPDATING
- 2026-03-01
Affects: users of databases/postgresql* and other software using PostgreSQL to run Author: kbowling@FreeBSD.org Reason:
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 --no-data-checksums -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
2) The initdb in the upgrade procedure uses '--no-data-checksums' to enable
pg_upgrade from before this change. You should review the documentation and
decide whether you want to then enable checksums with pg_checksums. Future
upgrade instructions for PostgreSQL 19 and later will assume a default
initdb, and therefore that checksums are enabled.
|
Number of commits found: 4
| Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
| This is a slave port. You may also want to view the commits to the master port: databases/pgtcl | | Commit | Credits | Log message |
2.1.1_3 16 Aug 2026 17:03:01
    |
Palle Girgensohn (girgen)  |
databases/postgresql??-*: Update to latest versions
Update to 18.6, 17.11, 16.15, 15.19 and 14.24.
This release fixes 28 security vulnerabilities and over 110 bugs
reported over the last several months.
Welcome postgresql19 to the ports tree with 19-beta3.
Note: PostgreSQL 18.5 was skipped due to a regression; the fix
version is 18.6.
PostgreSQL 14 will stop receiving fixes on 2026-11-12.
Changes: https://www.postgresql.org/about/news/postgresql-186-1711-1615-1519-1424-and-19-beta-3-released-3365/
Security: 05d311bc-9991-11f1-bc50-6cc21735f730 |
2.1.1_2 25 Nov 2021 21:40:11
    |
Stefan Eßer (se)  |
*/*: Remove redundant '-*' from CONFLICTS definitions
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket) |
2.1.1_2 29 Oct 2021 09:50:18
    |
Stefan Eßer (se)  |
*/*: Remove redundant '-[0-9]*' from CONFLICTS
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Many CONFLICTS definitions used patterns like "bash-[0-9]*" to filter
for the bash package in any version. But that pattern is functionally
identical with just "bash".
Approved by: portmgr (blanket) |
2.1.1_2 20 May 2021 14:38:55
    |
Palle Girgensohn (girgen)  |
databases/postgresql14-*: Add postgresql 14 beta1 the the ports tree.
Release notes: https://www.postgresql.org/docs/devel/release-14.html
Also reintroduce parallel builds. Some components, namely plperl,
plpython, pltcl and contrib, fail to build properly when using parallel
builds. Something with static linking using `ar` that fails.
MAKE_JOBS_UNSAFE is set for these ports. |
Number of commits found: 4
|