postgresql怎么启动服务

使用pg_resetxlog命令启动postgresql

这个命令使用很明显需要到bin目录下。

D:softwarepostgresqlin

进入到这个目录后

然后使用pg_resetxlog D:softwarepostgresqldata,有可能会报一个错误postmaster.pid未删除,手动把这个删除即可。或者

pg_resetxlog -f D:softwarepostgresqldata 强制删除。要记得这个有可能会影响数据。因为毕竟涉及到事务。这个命令执行成功

后,重启postgresql服务即可,如果还不行,手动把postres的进程全部杀掉。确认已经没有postgres进程后再去重启postgres服务即

可。这个基本上就可以了。

推荐学习《python教程》。

来源:PY学习网:原文地址:https://www.py.cn/article.html

hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » postgresql怎么启动服务