本文介绍了无法在Mac OS X上重新启动Postgres的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我无法在Mac OS X上重新启动Postgres服务器。
如何解决此问题?

I cannot restart the postgres server on Mac OS X.How can I fix this?

尝试了两种方法:

pg_ctl重新启动返回:

pg_ctl restart returns:

pg_ctl: PID file "usr/local/var/postgres:/postmaster.pid" does not exist
Is server running?
starting server anyway
pg_ctl: could not read file "usr/local/var/postgres:/postmaster.opts"

服务器不重新启动

pg_ctl -D / usr / local / var / postgres重新启动结果为:

pg_ctl -D /usr/local/var/postgres restart results in:

   pg_ctl: PID file "/usr/local/var/postgres/postmaster.pid" does not exist
   Is server running?
   starting server anyway
   server starting
   LOG:  could not bind IPv4 socket: Address already in use
   HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
   LOG:  could not bind IPv6 socket: Address already in use
   HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
   WARNING:  could not create listen socket for "*"
   FATAL:  could not create any TCP/IP sockets


推荐答案

1-您的数据目录可能是错误的。确保使用正确的路径。

1 - Your data directory might be wrong. Make sure you use the right path.

2-如果安装多个postgres,则需要指定哪个 pg_ctl

2 - If you install more than one postgres, you need to specify which pg_ctl to use.

我手动安装了postgres 9.2,这是我的启动方式:

I installed postgres 9.2 manually, here's how I start it:

/Library/PostgreSQL/9.2/bin/pg_ctl -D /Library/PostgreSQL/9.2/data start

我通过HomeBrew安装了postgres 9.1,开始方式如下:

I installed postgres 9.1 via HomeBrew, here's how it gets started:

/usr/local/Cellar/postgresql/9.1.5/bin/pg_ctl -D /usr/local/var/postgres-9.1.5 start

这篇关于无法在Mac OS X上重新启动Postgres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 22:15