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](#)>.
- 數據表
- 模式Schema
- 表的繼承和分區
- 常用數據類型
- 函數和操作符-一
- 函數和操作符-二
- 函數和操作符-三
- 索引
- 事物隔離
- 性能提升技巧
- 服務器配置
- 角色和權限
- 數據庫管理
- 數據庫維護
- 系統表
- 系統視圖
- SQL語言函數
- PL-pgSQL過程語言
- PostgreSQL 序列(SEQUENCE)
- PostgreSQL的時間-日期函數使用
- PostgreSQL 查看數據庫,索引,表,表空間大小
- 用以查詢某表的詳細 包含表字段的注釋信息
- PostgreSQL 系統表查看系統信息
- postgre存儲過程簡單實用方法
- PostgreSQL實用日常維護SQL
- PostgreSQL的時間函數使用整理
- 命令
- pg_ctl控制服務器
- initdb 初始化數據庫簇
- createdb創建數據庫
- dropdb 刪除數據庫
- createuser創建用戶
- dropuser 刪除用戶
- psql交互式工具
- psql命令手冊
- pg_dump 數據庫轉儲
- pg_restore恢復數據庫
- vacuumdb 清理優化數據庫
- reindexdb 數據庫重創索引
- createlang 安裝過程語言
- droplang 刪除過程語言
- pg_upgrade 升級數據庫簇
- 調試存儲過程
- 客戶端命令-一
- 客戶端命令-二
- 使用技巧
- PostgreSQL刪除重復數據
- postgresql 小技巧
- PostgreSQL的10進制與16進制互轉
- PostgreSQL的漢字轉拼音
- Postgres重復數據的更新一例
- PostgreSQL使用with一例
- PostgreSQL在函數內返回returning
- PostgreSQL中的group_concat使用
- PostgreSQL數據庫切割和組合字段函數
- postgresql重復數據的刪除
- PostgreSQL的遞歸查詢(with recursive)
- PostgreSQL函數如何返回數據集
- PostgreSQL分區表(Table Partitioning)應用 - David_Tang - 博客園
- PostgreSQL: function 返回結果集多列和單列的例子
- 利用pgAgent創建定時任務
- 淺談 PostgreSQL 類型轉換類似Oracle
- postgresql在windows(包括win7)下的安裝配置
- PostgreSQL簡介、安裝、用戶管理、啟動關閉、創建刪除數據庫 (2010-11-08 12-52-51)轉載▼標簽: 雜談分類: PostgreSQL
- PostgreSQL的generate_series函數應用
- PostgreSQL 8.3.1 全文檢索(Full Text Search)
- postgresql record 使用
- 備份恢復
- PostgreSQL基于時間點恢復(PITR)
- Postgresql基于時間點恢復PITR案例(二)
- Postgres邏輯備份腳本
- Postgres invalid command \N數據恢復處理