[octopus@pc3 ~]$ sudo dnf install postgresql-upgrade
Updating and loading repositories:
Copr repo for PyCharm owned by phracek 100% | 5.4 KiB/s | 3.9 KiB | 00m01s
google-chrome 100% | 10.7 KiB/s | 3.3 KiB | 00m00s
Fedora 41 openh264 (From Cisco) - x86_ 100% | 3.1 KiB/s | 4.8 KiB | 00m02s
Fedora 41 - x86_64 - Updates 100% | 2.7 MiB/s | 2.9 MiB | 00m01s
Fedora 41 - x86_64 100% | 623.6 KiB/s | 35.2 MiB | 00m58s
RPM Fusion for Fedora 41 - Nonfree - N 100% | 15.3 KiB/s | 24.8 KiB | 00m02s
RPM Fusion for Fedora 41 - Nonfree - S 100% | 11.2 KiB/s | 20.4 KiB | 00m02s
Fedora 41 - x86_64 - VirtualBox 100% | 18.8 KiB/s | 27.6 KiB | 00m01s
>>> Status code: 404 for
http://download.virtualbox.org/virtualbox/rpm/fedora/41>>> Status code: 404 for
http://download.virtualbox.org/virtualbox/rpm/fedora/41>>> Status code: 404 for
http://download.virtualbox.org/virtualbox/rpm/fedora/41>>> Status code: 404 for
http://download.virtualbox.org/virtualbox/rpm/fedora/41>>> Librepo error: Cannot download repomd.xml: Cannot download repodata/repomd.x
Repositories loaded.
Package Arch Version Repository Size
Removing:
kernel x86_64 6.7.4-200.fc39 updates 0.0 B
kernel-core x86_64 6.7.4-200.fc39 updates 66.0 MiB
kernel-devel x86_64 6.7.4-200.fc39 updates 69.6 MiB
kernel-modules x86_64 6.7.4-200.fc39 updates 56.9 MiB
kernel-modules-core x86_64 6.7.4-200.fc39 updates 32.0 MiB
kernel-modules-extra x86_64 6.7.4-200.fc39 updates 2.4 MiB
Installing:
postgresql-upgrade x86_64 16.3-3.fc41 fedora 31.8 MiB
Installing dependencies:
uuid x86_64 1.6.2-64.fc41 fedora 128.9 KiB
Transaction Summary:
Installing: 2 packages
Removing: 6 packages
Total size of inbound packages is 7 MiB. Need to download 7 MiB.
Is this ok [y/N]: y
[1/2] uuid-0:1.6.2-64.fc41.x86_64 100% | 83.7 KiB/s | 58.5 KiB | 00m01s
[2/2] postgresql-upgrade-0:16.3-3.fc41. 100% | 67.6 KiB/s | 7.4 MiB | 01m52s
--------------------------------------------------------------------------------
[2/2] Total 100% | 67.9 KiB/s | 7.5 MiB | 01m53s
Running transaction
Importing PGP key 0xE99D6AD1:
UserID : "Fedora (41) <fedora-41-primary@fedoraproject.org>"
Fingerprint: 466CF2D8B60BC3057AA9453ED0622462E99D6AD1
From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-41-x86_64
Is this ok [y/N]: y
The key was successfully imported.
[ 1/10] Verify package files 100% | 19.0 B/s | 2.0 B | 00m00s
[ 2/10] Prepare transaction 100% | 0.0 B/s | 8.0 B | 00m10s
[ 3/10] Installing uuid-0:1.6.2-64.fc41 100% | 538.0 KiB/s | 131.8 KiB | 00m00s
[ 4/10] Installing postgresql-upgrade-0 100% | 26.5 MiB/s | 31.9 MiB | 00m01s
[ 5/10] Erasing kernel-modules-extra-0: 100% | 7.0 B/s | 131.0 B | 00m18s
[ 6/10] Erasing kernel-0:6.7.4-200.fc39 100% | 1.7 KiB/s | 100.0 B | 00m00s
[ 7/10] Erasing kernel-modules-0:6.7.4- 100% | 350.0 B/s | 2.2 KiB | 00m06s
[ 8/10] Erasing kernel-modules-core-0:6 100% | 1.8 KiB/s | 3.0 KiB | 00m02s
[ 9/10] Erasing kernel-core-0:6.7.4-200 100% | 7.0 B/s | 17.0 B | 00m02s
[10/10] Erasing kernel-devel-0:6.7.4-20 100% | 1.1 KiB/s | 22.1 KiB | 00m21s
Complete!
[octopus@pc3 ~]$ sudo postgresql-setup --upgrade
[sudo] password for octopus:
* Upgrading database.
* Upgraded OK.
WARNING: The configuration files were replaced by default configuration.
WARNING: The previous configuration and data are stored in folder
WARNING: /var/lib/pgsql/data-old.
WARNING: If you've just upgraded your database from a previous major version of
Fedora or RHEL, please run reindexdb against your databases. Core library
collation data may have changed and this will invalidate database indexes. For
example, in Fedora 28 and RHEL 8 there have been extensive changes in glibc
collations to support ISO 14651:2016 (Unicode 9.0.0 data) and your indexes may
be affected:
https://sourceware.org/ml/libc-announce/2018/msg00002.html * See /var/lib/pgsql/upgrade_postgresql.log for details.
先安装postgresql-upgrade软件包:sudo dnf install postgresql-upgrade。
再执行sudo postgresql-setup --upgrade命令。