_# jeffery # focus on Odoo and other open source IT solutions # IT基础架构资深专家,开源解决方案专家,odoo资深专家__Q:913547235 讨论群397750860

Upgrade to postgresql 9.5

   

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'

   

   

   

   

   

posted on 2016-01-11 19:00  odoouse  阅读(727)  评论(0编辑  收藏  举报

导航

_# jeffery # focus on Odoo and other open source IT solutions # IT基础架构资深专家,开源解决方案专家,odoo资深专家