标签:
? ?
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‘
? ?
? ?
? ?
? ?
? ?
标签:
原文地址:http://www.cnblogs.com/odoouse/p/5122249.html