码迷,mamicode.com
首页 > 数据库 > 详细

Upgrade to postgresql 9.5

时间:2016-01-11 20:25:09      阅读:397      评论:0      收藏:0      [点我收藏+]

标签:

? ?

Add postgresql apt repo.. according to your distribution (utopic, trusty, jessie, wheezy and etc):

? ?

deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.5

? ?

Install postgresql 9.5

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

apt-get update

apt-get install postgresql-9.5

? ?

? ?

Upgrade db files.

? ?

Pg9.3 to pg9.5, run the following command

? ?

sudo -H -u postgres

/usr/lib/postgresql/9.5/bin/pg_upgrade -b /usr/lib/postgresql/9.3/bin/

-B /usr/lib/postgresql/9.5/bin/

-d /var/lib/postgresql/9.3/main

-D /var/lib/postgresql/9.5/main

-o ‘ -c config_file=/etc/postgresql/9.3/main/postgresql.conf‘

-O ‘ -c config_file=/etc/postgresql/9.5/main/postgresql.conf‘

? ?

? ?

? ?

Pg9.1 to pg9.5, run the following command

? ?

sudo -H -u postgres

/usr/lib/postgresql/9.5/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin/

-B /usr/lib/postgresql/9.5/bin/

-d /var/lib/postgresql/9.1/main

-D /var/lib/postgresql/9.5/main

-o ‘ -c config_file=/etc/postgresql/9.1/main/postgresql.conf‘

-O ‘ -c config_file=/etc/postgresql/9.5/main/postgresql.conf‘

? ?

? ?

? ?

? ?

? ?

Upgrade to postgresql 9.5

标签:

原文地址:http://www.cnblogs.com/odoouse/p/5122249.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!