Restarting postgres server
Restarting postgres server
От:
George Heller <george.heller@yahoo.com>
Дата:
Hi all.
I just modified my pg_hba.conf file in order to allow
access from another machine. I needed to restart the
postgres server in order for the changes to take
effect, and so I issued the command,
pg_ctl restart -D /usr/local/pgsql/data
But the server failed to shutdown. The database was
not accessible either. So I restarted the server
machine, and now when I try to access the database
using,
psql mydatabase postgres
it gives me the error,
psql: could not connect to server: No such file or
directory
Is the server running locally and accepting
connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?
I have a lot of data in there, so I dont want to get
it erased. Any ideas of how I can get this working, if
I need to restart the postmaster, what would be the
command? I am just a beginner with this thing, so
please bear with me.
Thanks in advance.
George
____________________________________________________________________________________Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
Re: Restarting postgres server
От:
Jeff Davis <pgsql@j-davis.com>
Дата:
On Mon, 2007-05-14 at 15:21 -0700, George Heller wrote: > psql: could not connect to server: No such file or > directory > Is the server running locally and accepting > connections on Unix domain socket > "/tmp/.s.PGSQL.5432"? > > I have a lot of data in there, so I dont want to get > it erased. Any ideas of how I can get this working, if > I need to restart the postmaster, what would be the > command? I am just a beginner with this thing, so > please bear with me. Try to start the server again, with: pg_ctl -D /usr/local/pgsql/data start and see the log output. The logs should tell you what the problem is. Regards, Jeff Davis
Re: Restarting postgres server
От:
Matthew Terenzio <matt@jobsforge.com>
Дата:
On May 14, 2007, at 6:21 PM, George Heller wrote: > psql mydatabase postgres > > it gives me the error, > psql: could not connect to server: No such file or > directory Depending on your setup, postgres might not be starting automatically on reboot. Try: pg_ctl start -D [datadir] replacing [datadir] with your path like you did before and any other options you want to send it. pg_ctl --help for reference