PostgreSQL服务器不会停止

编程入门 行业动态 更新时间:2024-10-26 04:23:56
本文介绍了PostgreSQL服务器不会停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Mac OS X 10.8.4上的PostgreSQL有点问题.当postgres服务器运行时,我不小心做了brew rm postgresql --force.当我使用brew install postgresql安装并运行pg_ctl -D /usr/local/var/postgres start时,我得到:

Having a bit of an issue with PostgreSQL on Mac OS X 10.8.4. I accidentally did brew rm postgresql --force while the postgres server was running. When I installed using brew install postgresql and ran pg_ctl -D /usr/local/var/postgres start I get:

pg_ctl: another server might be running; trying to start server anyway server starting FATAL: lock file "postmaster.pid" already exists HINT: Is another postmaster (PID 752) running in data directory "/usr/local/var/postgres"?

当我运行"ps -ef | grep postgres"时,我得到:

when I run "ps -ef | grep postgres" I get:

501 752 235 0 12:42PM ?? 0:00.01 /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log 501 754 752 0 12:42PM ?? 0:00.00 postgres: checkpointer process 501 755 752 0 12:42PM ?? 0:00.34 postgres: writer process 501 756 752 0 12:42PM ?? 0:00.02 postgres: wal writer process 501 757 752 0 12:42PM ?? 0:00.01 postgres: autovacuum launcher process 501 758 752 0 12:42PM ?? 0:00.01 postgres: stats collector process 501 945 452 0 12:58PM ttys000 0:00.00 grep postgres

当我尝试使用pg_ctl stop -D /usr/local/var/postgres -m fast或pg_ctl -D /usr/local/var/postgres stop -mi停止服务器时,我得到:

when I try to stop the server with pg_ctl stop -D /usr/local/var/postgres -m fast or pg_ctl -D /usr/local/var/postgres stop -mi I get:

waiting for server to shut down........................................... Failed pg_ctl: server does not shut down

编辑

which pg_ctl /usr/local/bin/pg_ctl pg_ctl --version pg_ctl (PostgreSQL) 9.2.4

server.log的要旨: gist.github/anonymous/6106182

推荐答案

原来需要在〜/Library/LaunchAgents/处卸载和删除我的postgres的brew.plist.重新启动后一切都很好...关闭的问题.

turns out that my brew.plist for postgres needed to be unloaded and removed at ~/Library/LaunchAgents/ . After a restart all is well... closing question.

更多推荐

PostgreSQL服务器不会停止

本文发布于:2023-10-24 13:27:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524075.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   PostgreSQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!