作者:瀚高PG实验室 (Highgo PG Lab)- 狮子歌歌
小版本升级的手册解释:
Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number, e.g., 8.4.2 is compatible with 8.4, 8.4.1 and 8.4.6. To update between compatible versions, you simply replace the executables while the server is down and restart the server. The data directory remains unchanged — minor upgrades are that simple.
总结: 保持 pgdata不变,替换掉PGHOME里的所有可执行文件。
其实就是覆盖安装。
注意: 安装的时候注意权限问题。
主要步骤如下:
原先是9.5.3,现在升级到9.5.7
tar -jxvf postgresql-9.5.7.tar.bz2
cd postgresql-9.5.7
./configure --prefix=$PGHOME
make world -j 8
make install-world
安装时候注意权限问题。
本文介绍了PostgreSQL小版本升级的过程,保持pgdata目录不变,替换PGHOME中的可执行文件即可完成升级。从9.5.3升级到9.5.7的具体步骤包括解压新版本、配置、编译及安装。
1422





