• 技术文章 >数据库 >PostgreSQL

    postgresql常见错误

    yangyang2020-04-06 10:45:40原创3093

    我们在操作数据库的时候,我们总会遇到很多错误。下面整理了一下常见的错误。

    错误1

    FATAL: connection limit exceeded for non-superusers

    原因:非超级用户的连接数(max_connections - superuser_reserved_connections)超过了设定值

    解决办法:增加max_connections设定值,但如果增加了过多的话,数据库负担太大还容易产生内存错误。可以记住pg-pool等工具来辅助解决。

    错误2

    FATAL: sorry, too many clients already

    原因:数据库服务器的连接数超过了max_connections设定值。

    解决办法:和错误1解决办法类似。

    错误3

    LOG: checkpoints are occurring too frequently

    原因:checkpoint处理正频繁发生。

    解决办法:增加checkpoint_segments的值。

    错误4

    LOG: archive command failed with exit code (X)

    原因:archive_command 失败了。

    解决办法:因为有可能是硬盘没空间了,所以可以把数据库的log删除一些。

    错误5

    LOG: number of page slots needed (X) exceeds max_fsm_pages (Y)

    原因:max_fsm_pages不足了。

    解决办法:增加max_fsm_pages的同时进行 VACUUM FULL。

    错误6

    ERROR: operator does not exist: character = integer

    原因:PostgreSQL8.3以后,取消了默认类型转换。因此需要使比较的类型保持一致。可以看cast函数。

    推荐:PostgreSQL教程

    专题推荐:postgresql
    品易云
    上一篇:postgresql查询是否存在某些表 下一篇:postgresql初始化失败

    相关文章推荐

    • postgresql怎么关闭服务器• postgresql怎么查数据库信息• postgresql的权限不够如何解决• linux怎么启动postgresql

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网