User Tools

Site Tools


postgresqlupgrade

This is an old revision of the document!


PostgreSQL Upgrades

Using pg_upgrade

/usr/lib/postgresql/14/bin/pg_upgrade   --old-datadir=/var/lib/postgresql/10/main   
                                        --new-datadir=/var/lib/postgresql/14/main   
                                        --old-bindir=/usr/lib/postgresql/10/bin   
                                        --new-bindir=/usr/lib/postgresql/14/bin   
                                        --old-options='-c config_file=/etc/postgresql/10/main/postgresql.conf'   
                                        --new-options='-c config_file=/etc/postgresql/14/main/postgresql.conf'   
                                        --link --jobs=4 --check

Upgrade Streaming Replication server.

rsync --verbose --archive --delete --hard-links --size-only --no-inc-recursive --human-readable 
      10 14 postgres@postgres02-upgrade:/var/lib/postgresql
postgresqlupgrade.1709305506.txt.gz · Last modified: 2025/03/08 22:23 (external edit)