文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>postgresql 故障记录

postgresql 故障记录

时间:2010-03-02  来源:cainoma

错误标题:编码格式错误   错误回显:  postgres#\d ERROR:  invalid byte sequence for encoding "UTF8": 0xc3fb
▒▒ʾ:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
现象描述:只要是UTF8编码的都出现这个错误   解决方案:   # vi /etc/profile       export LANG=zh_CN.GBK
      export LANG=zh_CN.UTF8 (添加的) 
  原因:  与编码格式有关     登陆的时候读取/etc/profile中的export LANG=zh_CN.GBK
    但是数据库中的编码格式是UTF8和SQL_ASCII
    UTF8的 出现上述错误回显   错误标题:max_connections = 40==>100 之后无法启动   错误回显:    # vim postgresql.conf (修改最大连接数)       max_connections = 100    # pg_ctl start -D pgsql/data/ (启动数据库)       server starting       FATAL:  could not create shared memory segment: Invalid argument
     DETAIL:  Failed system call was shmget(key=5432001, size=33562624, 03600).
     HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 33562624 bytes), reduce PostgreSQL's shared_buffers parameter (currently 3584) and/or its max_connections parameter (currently 103).
     If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
     The PostgreSQL documentation contains more information about shared memory configuration.
     译文:
         致命的:不能创建共享内存段:无效的参数
    详细信息:系统调用失败shmget的(关键= 5432001,大小= 33562624,03600)。
    提示:此错误通常意味着PostgreSQL的一个共享内存段的要求超出了你的内核的SHMMAX参数。您可以减少请求大小或更大的SHMMAX的重新配置内核。为减少请求大小(目前为33562624字节),减少PostgreSQL的shared_buffers参数(目前3584)和/或其max_connections的参数(目前为103)。
        如果请求规模已经很小,这可能是它比你的内核的SHMMIN参数,在这种情况下提出请求的大小或重新配置SHMMIN称为不足。
        PostgreSQL的文档包含有关共享内存的配置信息。
   解决方案:     修改系统参数      # vim /etc/sysctl.conf        kern.ipc.shmmax=134217728
       kern.ipc.shmall=32768
       kern.ipc.semmap=256 
     # vim  /boot/loader.conf        kern.ipc.semmni=256
       kern.ipc.semmns=512
       kern.ipc.semmnu=256
   原因:     因为最大连接数修改之后,必须将内核参数也要做相应修改.(具体原因在查) 这是我的理解,可能会有出入,还希望数据库高手帮我详细解答,非常感谢    
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载