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的更多相关文章

  1. gitlab升级、汉化、修改root密码

    1.gitlab升级 # 查看当前版本 head -1 /opt/gitlab/version-manifest.txt gitlab-ce 8.9.5 grep "^external_ur ...

  2. GitLab - 安装并启动GitLab

    1 - GitLab安装 1.1 信息确认 [Anliven@node102 ~]$ uname -a Linux node102 3.10.0-957.el7.x86_64 #1 SMP Thu N ...

  3. oracle_fdw安装及使用(无法访问oracle存储过程等对象)

    通过oracle_fdw可以访问oracle中的一些表和视图,也可以进行修改,尤其是给比较复杂的系统使用非常方便. (但不能使用oracle_fdw来访问oracle的存储过程.包.函数.序列等对象) ...

  4. postgresql利用pg_upgrade升级数据库(从8.4升级到9.5)

    其他见:http://my.oschina.net/ensn/blog/636766 本文利用pg_upgrade实现将8.4.18版本升级到9.5.0版本,8.4.18版本为RedHat系统自带pg ...

  5. centos下postgresql的安装与配置[转]

    本文摘自:http://blog.chinaunix.net/uid-24846094-id-78490.html 一.安装(以root身份进行) 1.检出最新的postgresql的yum配置从ht ...

  6. spark1.6配置sparksql 的元数据存储到postgresql中

    1:首先配置hive-site.xml <configuration> <property> <name>javax.jdo.option.ConnectionUR ...

  7. PostgreSQL9.1 upgrade to PostgreSQL9.5rc1

    PostgreSQL9.1.0 upgrade to PostgreSQL9.5rc1 安装PG9.1端口为5432 [pgup@minion1 pg]$ ls postgresql-9.1.0.ta ...

  8. PostgreSQL pg_dump pg_dumpall and restore

    pg_dump dumps a database as a text file or to other formats. Usage: pg_dump [OPTION]... [DBNAME] Gen ...

  9. PostgreSQL与RPM

    如何查看使用PostgreSQL的RPM包安装后的文件目录及相关路径(PostgreSQLRPM的spec文件已经帮我们创建好了postgres用户及postgres组). 查看RPM文档信息:/us ...

随机推荐

  1. 《Python全栈开发指南》第3版 Alex著(LFXC2018)

    第一章 Python基础——Python介绍&循环语句 1.1 编程语言介绍 1.2 Python介绍 1.3 Python安装 1.4 第一个Python程序 1.5 变量 1.6 程序交互 ...

  2. 爬虫Scrapy框架-1

    Scrapy 第一步:安装 linux: pip3 install scrapy windows: 1:pip3 install wheel ,安装wheel模块 2.下载twisted:http:/ ...

  3. poj 2195 最小费用最大流模板

    /*Source Code Problem: 2195 User: HEU_daoguang Memory: 1172K Time: 94MS Language: G++ Result: Accept ...

  4. Welcome-to-Swift-24高级运算符(Advanced Operators)

    除了基本操作符中所讲的运算符,Swift还有许多复杂的高级运算符,包括了C语和Objective-C中的位运算符和移位运算. 不同于C语言中的数值计算,Swift的数值计算默认是不可溢出的.溢出行为会 ...

  5. Apache2 FastCGI C Demo

    安装依赖 sudo apt-get install libapache2-mod-fastcgi a2enmod fastcgi sudo apt-get install libfcgi-dev li ...

  6. NOJ——1665夜神的思考(YY+组合问题+分类讨论)

    [1665] 夜神的思考 时间限制: 1000 ms 内存限制: 65535 K 问题描述 最近夜神对二进制很感兴趣,于是他每次看到一串只包含1和0的字符串的时候就会想,这串字符串有多少子串是含有k个 ...

  7. JavaScript阻止冒泡和取消事件默认行为

    //功能:停止事件冒泡 function stopBubble(e) { if ( e && e.stopPropagation ) { e.stopPropagation(); } ...

  8. 如何在github上寻找漏洞

    https://github.com/search?p=2&q=eval%28%24_POST[&ref=searchresults&type=Code   1.$_GET s ...

  9. 表单编码 appliation/x-www-form-urlencoded 与 multipart/form-data 的区别

    当表单使用POST方法时,表单数据提交到服务器端之前有两种编码类型可供选择.默认编码类型为 application/x-www-form-urlencoded,此时所有非字母数字类型的字符都需要转换为 ...

  10. social-auth-app-django模块

    一 原文地址:http://www.cnblogs.com/adc8868/p/7665864.html social-auth-app-django模块是专门用于Django的第三方登录OAuth2 ...