zoukankan      html  css  js  c++  java
  • postgres9.5.3升级postgres11.6

    附上postgres下载地址:

    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/postgresqldbserver11.group.html
    

     分别下载rpm包,并安装

    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/postgresql11-11.6-1PGDG.rhel7.x86_64.rpm
    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/postgresql11-contrib-11.6-1PGDG.rhel7.x86_64.rpm
    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/postgresql11-libs-11.6-1PGDG.rhel7.x86_64.rpm
    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/postgresql11-server-11.6-1PGDG.rhel7.x86_64.rpm
    https://yum.postgresql.org/11/redhat/rhel-7-x86_64/postgresql11-devel-11.6-1PGDG.rhel7.x86_64.rpm
    yum localinstall postgresql11-*
    

      

    检查升级条件是否具备
    /usr/pgsql-11/bin/pg_upgrade --link -b /usr/local/pgsql/9.5/bin -B /usr/pgsql-11/bin/ -d /data/pgsql/data_159 -D /data/pgsql/11/data/ -p 5432 -P 5433
    通过硬连接进行升级(切记注意升级前进行数据完整备份,防止出现不可预料的问题)
    /usr/pgsql-11/bin/pg_upgrade -b /usr/local/pgsql/9.5/bin -B /usr/pgsql-11/bin/ -d /data/pgsql/data_159/ -D /data/pgsql/11/data/ -p 5432 -P 5433 -U postgres -j 8 --link --check
    启动新版的postgres数据库
    /usr/pgsql-11/bin/pg_ctl -D /data/pgsql/11/data start
    

      

    参考:https://cloud.tencent.com/developer/article/1506934

  • 相关阅读:
    BZOJ 5018 [Snoi2017]英雄联盟
    BZOJ 4945 [Noi2017]游戏
    BZOJ4942 [Noi2017]整数
    BZOJ 2427 [HAOI2010]软件安装
    BZOJ 4870 [Shoi2017]组合数问题
    THINKPHP 全局404
    PHP 万能查询代码
    xml Array 相互转化
    JS 倒计时计算
    PHP 多态
  • 原文地址:https://www.cnblogs.com/caidingyu/p/11926481.html
Copyright © 2011-2022 走看看