470,614 Members | 1,434 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

Problem stopping PostgreSQL in Cygwin

JP
Just installed Cygwin on my Win 2K Pro workstation today.

I had the installer install PostgreSQL, and it's working just fine. I can
start it either with
postmaster -D /blah/blah/blah &
or with
pg_ctl -D /blah/blah/blah start

however, it will not stop for me (pg_ctl -D /blah/blah/blah stop). It gets
about half way through the second line of "dots" and then says "failed".
"pg_ctl: postmaster does not shut down" or words to that effect.

Not sure if this is anything, but in my /Data directory, postmaster.pid
is -rw-------. It has my ID as the owner. Permissions? If so, why?
Running this thing "straight out of the box".

Also, on an unrelated topic (and pardon my ignorance), what is the correct
procedure for shutting down Cygwin? I assume clicking the 'X' is probably
not best practise, yes?

Thanks for any and all help.

JP

Jul 19 '05 #1
1 2352
These are two distinct issues, JP.

First of all, POSTGRES depends on CYGIPC to work properly. Prior to
activating your server, you should call "/usr/bin/ipc-daemon2 &" and
leave it running. This is an oddity that should cease to exist in the
future, but, for now...

Shutting down the server through pg_ctl does not work due to a
difference in the shells supplied with the Cygwin distribution. In
fact, your kill command doesn't work in the script and works on the
prompt because you're using two different shell interpreters. Edit
pg_ctl and change the first line to #!/bin/bash (rather than #!
/bin/sh) and everything should work properly.

'hope this can help.

"JP" <x@y.com> wrote in message news:<2MG9b.38049$S_.5002@fed1read01>...
This is going to seem strange .....

The interperter does not seem to be recognizing the kill in pg_ctl
correctly.

When it hits the kill, it displays the usage stuff. If I echo out the kill
command before it executes, it looks perfectly normal. If I execute what is
echoed out, it shuts down Postgres just fine.

Why would pg_ctl create a perfectly formed kill statement and the
interpreter think it is not?

JP

"JP" <x@y.com> wrote in message news:fVy9b.38010$S_.28807@fed1read01...
Just installed Cygwin on my Win 2K Pro workstation today.

I had the installer install PostgreSQL, and it's working just fine. I can
start it either with
postmaster -D /blah/blah/blah &
or with
pg_ctl -D /blah/blah/blah start

however, it will not stop for me (pg_ctl -D /blah/blah/blah stop). It

gets
about half way through the second line of "dots" and then says "failed".
"pg_ctl: postmaster does not shut down" or words to that effect.

Not sure if this is anything, but in my /Data directory, postmaster.pid
is -rw-------. It has my ID as the owner. Permissions? If so, why?
Running this thing "straight out of the box".

Also, on an unrelated topic (and pardon my ignorance), what is the correct
procedure for shutting down Cygwin? I assume clicking the 'X' is probably
not best practise, yes?

Thanks for any and all help.

JP

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill Grigg | last post: by
reply views Thread by slash | last post: by
1 post views Thread by Muhyiddin A.M Hayat | last post: by
13 posts views Thread by Zlatko Matić | last post: by
reply views Thread by Melanie Bergeron | last post: by
4 posts views Thread by John Small | last post: by
15 posts views Thread by Együd Csaba | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.