Notes from UPDATING |
- These upgrade notes are taken from /usr/ports/UPDATING
- 2023-09-08
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 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
|
Number of commits found: 5
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_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 07 Apr 2021 08:09:01 |
Mathieu Arnold (mat) |
One more small cleanup, forgotten yesterday.
Reported by: lwhsu |
2.1.1_2 06 Apr 2021 14:31:07 |
Mathieu Arnold (mat) |
Remove # $FreeBSD$ from Makefiles. |
2.1.1_2 24 Sep 2020 13:33:10 |
girgen |
Welcome PostgreSQL 13
Release notes: https://www.postgresql.org/about/news/2077/ |
Number of commits found: 5
|