加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – 由于锁定文件的权限被拒绝,无法启动Postgres Serv

发布时间:2020-12-13 16:13:46 所属栏目:百科 来源:网络整理
导读:我重启了Postgres服务器,但现在. 我检查了我的“pgstartup.log”日志文件.这说: creating system views ... okloading system objects' descriptions ... okcreating conversions ... okcreating dictionaries ... oksetting privileges on built-in object
我重启了Postgres服务器,但现在.
我检查了我的“pgstartup.log”日志文件.这说:
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:
/usr/bin/postgres -D /var/lib/pgsql/data
/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied

你认为删除/tmp/.s.PGSQL.5432.lock会起作用吗?

PostgreSQL通常在正确终止时删除锁定文件.

这可能是由于另一个PostgreSQL实例与另一个异常终止的用户一起运行(一个kill -9到postmaster).

因此,如果您确定没有运行Postgres进程,则可以删除该文件而不会出现任何问题.如果存在任何过时的共享内存段,您还应该使用ipcs命令检查,并在这种情况下使用ipcrm将其删除.

可能是同时解决所有这些问题的最佳方法是重新启动服务器.

P.S.:永远不会杀死-9任何PostgreSQL进程.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读