Fedota 24 将数据库升级到 PostgreSQL 9.5
PostgreSQL 是一款世界领先的开源数据库;在其9.5版本中有很多改进,详细版本变化如下:
- IMPORT FOREIGN SCHEMA
- Row-Level Security Policies
- BRIN Indexes
- Foreign Table Inheritance
- GROUPING SETS, CUBE and ROLLUP
- JSONB-modifying operators and functions
- INSERT … ON CONFLICT DO NOTHING/UPDATE (“UPSERT”)
- pg_rewind
和很多其他的变化,你可以进入posgresql维基详细了解。
在这里,我们会关心在Fedora 24中从9.4升级到9.5。
备份你的数据
这只是一个(重要)的建议:在进行升级之前,备份所有的数据。
升级PostgreSQL程序不是自动的,所以你必须做一些手动操作,但是,正如你将看到的,它很容易。
首先,安装升级包:
sudo dnf install postgresql-upgrade
现在,你可以用它来升级PostgreSQL:
sudo postgresql-setup --upgrade
在以上的程序,查看/var/lib/pgsql/upgrade_postgresql.log
日志文件的有用的资料,然后启动systemd服务:
sudo systemctl start postgresql.service
现在再执行命令:
sudo systemctl status postgresql.service
将会看到服务已经运行。
------------------------------------华丽丽的分割线------------------------------------
在CentOS 6.5上编译安装PostgreSQL 9.3数据库 http://www.linuxidc.com/Linux/2016-06/132272.htm
CentOS 6.3环境下yum安装PostgreSQL 9.3 http://www.linuxidc.com/Linux/2014-05/101787.htm
PostgreSQL缓存详述 http://www.linuxidc.com/Linux/2013-07/87778.htm
Windows平台编译 PostgreSQL http://www.linuxidc.com/Linux/2013-05/85114.htm
Ubuntu下LAPP(Linux+Apache+PostgreSQL+PHP)环境的配置与安装 http://www.linuxidc.com/Linux/2013-04/83564.htm
Ubuntu上的phppgAdmin安装及配置 http://www.linuxidc.com/Linux/2011-08/40520.htm
CentOS平台下安装PostgreSQL9.3 http://www.linuxidc.com/Linux/2014-05/101723.htm
PostgreSQL配置Streaming Replication集群 http://www.linuxidc.com/Linux/2014-05/101724.htm
------------------------------------华丽丽的分割线------------------------------------