多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
pg_upgrade upgrades a PostgreSQL cluster to a different major version. Usage:   pg_upgrade [OPTION]... Options:   -b, --old-bindir=OLDBINDIR    old cluster executable directory   -B, --new-bindir=NEWBINDIR    new cluster executable directory   -c, --check                   check clusters only, don't change any data   -d, --old-datadir=OLDDATADIR  old cluster data directory   -D, --new-datadir=NEWDATADIR  new cluster data directory   -k, --link                    link instead of copying files to new cluster   -o, --old-options=OPTIONS     old cluster options to pass to the server   -O, --new-options=OPTIONS     new cluster options to pass to the server   -p, --old-port=OLDPORT        old cluster port number (default 50432)   -P, --new-port=NEWPORT        new cluster port number (default 50432)   -r, --retain                  retain SQL and log files after success   -u, --user=NAME               cluster superuser (default "gjianbo")   -v, --verbose                 enable verbose internal logging   -V, --version                 display version information, then exit   -?, -h, --help                show this help, then exit Before running pg_upgrade you must:   create a new database cluster (using the new version of initdb)   shutdown the postmaster servicing the old cluster   shutdown the postmaster servicing the new cluster When you run pg_upgrade, you must provide the following information:   the data directory for the old cluster  (-d OLDDATADIR)   the data directory for the new cluster  (-D NEWDATADIR)   the "bin" directory for the old version (-b OLDBINDIR)   the "bin" directory for the new version (-B NEWBINDIR) For example:   pg_upgrade -d oldCluster/data -D newCluster/data -b oldCluster/bin -B newCluster/bin or   C:\> set PGDATAOLD=oldCluster/data   C:\> set PGDATANEW=newCluster/data   C:\> set PGBINOLD=oldCluster/bin   C:\> set PGBINNEW=newCluster/bin   C:\> pg_upgrade Report bugs to <[pgsql-bugs@postgresql.org](#)>.