问题一:如何配置pg远程访问
          修改postgresql.conf-->listen_addresses = '*'
          修改pg_hba.conf-->添加 host    all             all             0.0.0.0/0               trust
          ps:以上代表允许从任何地址登录postgresql
问题二:远程连接pg服务器时出现如下错误          
          psql: could not connect to server: No route to host
                   Is the server running on host "192.168.100.149" and accepting
                   TCP/IP connections on port 5432?
         原因:pg服务器的防火墙阻挡
         解决方案:pg服务器开放5432端口
        /sbin/iptables -I INPUT -p tcp --dport 5432 -j ACCEPT
        /etc/init.d/iptables save
        service iptables restart
问题三:pgpool-II安装好后,执行命令"createdb -p 9999 test"出错
         createdb: could not connect to database template1: could not connect to server: No such file or directory
          Is the server running locally and accepting
          connections on Unix domain socket "/tmp/.s.PGSQL.9999"?
      原因:没有指定pgpool所在的服务器
      解决方法:执行"createdb -h 192.168.100.148 -p 9999 test"
问题四:搭建复制模式后,如果节点1坏了,如何进行故障恢复?
      步骤一:在pgpool服务器上手动执行命令:pcp_attach_node -d 5 localhost 9898 postgres postgres 1 将失效的节点加入集群
         ps:localhost 是指pgpool的服务器
             9898      是指pcp端口
             postgres:postgres是指pcp管理的用户名和密码
             1是指节点号码
     步骤二:
问题五:搭建流复制环境时,在备库上,利用psql无法连接数据库,出现错误“psql: FATAL:  the database system is starting up"
           原因:备库的postgesql.conf中的“hot_standby"这个参数没有设置正确
            解决方法:设置hot_standby=on        
问题六:安装pgpool的时候出现错误"make: pg_config: Command not found"&"make: *** No targets.  Stop."
          指定路径:export PATH=/home/pg93/pgsql/bin:$PATH

问题七:备份脚本:pg_basebackup -F p -D $PGDATA -h 192.168.224.128 -p 5432 -U replica
           压力测试:pgbench -M prepared -n -r -f ./test.sql -p 5432 -U postgres -c 16 -T 60 postgres
问题八:man postgres 出现错误 No manual entry for postgres
           解决方法:修改/etc/man.config  添加man路径:MANPATH /usr/local/pgsql/share/man/
问题九:/usr/bin/ld: cannot find -lsasl2
           解决方法:安装yum install cyrus-sasl-devel -y

最新文章

  1. 去掉IE11的叉叉
  2. iOS AVCaptureSession 小视频开发总结,支持设备旋转
  3. jquery实现AJAX的4种方法
  4. sublime配置markdown
  5. Python: 程序print到文件中
  6. Hilbert space
  7. Android应用程序框架之无边界设计意图
  8. Spirng+SpringMVC+Maven+Mybatis+MySQL项目搭建(转)
  9. UVA11992 - Fast Matrix Operations(段树部分的变化)
  10. Webdriver API之操作(二)
  11. 如何设计一款APP,才能吸引用户眼球
  12. PHP 实例 AJAX 投票
  13. C# 以管理员权限删除文件
  14. 调试内核打印debugfs
  15. docker学习-常用命令2
  16. Apache Traffic Server
  17. Confluence 6 XML 备份恢复失败的问题解决
  18. 《es6标准入门》chapter11中关于Proxy的一个错误例子的纠正
  19. docker 安装nginx、php-fpm
  20. ios中xib文件的用法

热门文章

  1. JQuery中serialize()方法的使用
  2. day43 数据库学习 转自egon 老师博客 单表查询和多表查询
  3. How To Use the AWK language to Manipulate Text in Linux
  4. ASP.NET MVC中常用的ActionResult类型
  5. java System.arraycopy()
  6. bzoj 2351 [BeiJing2011]Matrix——二维哈希
  7. plsql远程访问数据库 解决ora-12541:TNS:无监听程序
  8. ASP.NET AJAX入门系列(2):使用ScriptManager控件
  9. Spring Cloud(Dalston.SR5)--Eureka 服务实例健康检查
  10. mac下安装、配置redies