Thread: postmaster does not shut down
I can't get pg to shutdown or otherwise respond. I closed the cygwin console window and opened another (PG was working fine with the other window).
$ pg_ctl status
pg_ctl: postmaster is running (pid: 1656)
Command line was:
/usr/bin/postmaster
$ pg_ctl stop -m immediate
kill 1656: No such process
waiting for postmaster to shut down........................
......... failed
pg_ctl: postmaster does not shut down
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
John Smith wrote: > I can't get pg to shutdown or otherwise respond. I closed the cygwin > console window and opened another (PG was working fine with the other > window). > > $ pg_ctl status > pg_ctl: postmaster is running (pid: 1656) > Command line was: > /usr/bin/postmaster > > $ pg_ctl stop -m immediate > kill 1656: No such process > waiting for postmaster to shut down........................ > ......... failed > pg_ctl: postmaster does not shut down Hi John, As a thought, what happens if you try a slightly different syntax of: $ pg_ctl -m immediate stop ? Also, does it look like PostgreSQL might be being kept open by a connection to it from an application or something not closing down? Regards and best wishes, Justin Clift -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi
I just deleted the pid file and started PG again. I guess closing the window kills it?
John
Justin Clift <justin@postgresql.org> wrote:
John Smith wrote:
> I can't get pg to shutdown or otherwise respond. I closed the cygwin
> console window and opened another (PG was working fine with the other
> window).
>
> $ pg_ctl status
> pg_ctl: postmaster is running (pid: 1656)
> Command line was:
> /usr/bin/postmaster
>
> $ pg_ctl stop -m immediate
> kill 1656: No such process
> waiting for postmaster to shut down........................
> ......... failed
> pg_ctl: postmaster does not shut down
Hi John,
As a thought, what happens if you try a slightly different syntax of:
$ pg_ctl -m immediate stop
?
Also, does it look like PostgreSQL might be being kept open by a
connection to it from an application or something not closing down?
Regards and best wishes,
Justin Clift
--
"My grand father once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
John Smith wrote: > I just deleted the pid file and started PG again. I guess closing the > window kills it? Ahhh... you started PostgreSQL from a cygwin window with: $ pg_ctl start and then closed the window? It does seem to like keeping the window open. Have you tried starting it using postmaster instead? $ postmaster -D /path/to/your/data/directory -i Not sure that will work, but it's a though. When PostgreSQL is configured to start as a service, it seems to be much easier. You can then just start it from the "Services" part of the Windows control panel (depending which operating system you're using of course). :-) Regards and best wishes, Justin Clift > John -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi
Hi all > I guess closing the window kills it? No. It doesn't kill postgresql and it doesn't kill the ipc-daemon. If you look at the win task manager you see the processes still running. You can kill it with the task manager but this is a rather inelegant way;-) > $ postmaster -D /path/to/your/data/directory -i > > Not sure that will work, but it's a though. It works fine;-) I am starting/stopping the processes with small shell scripts placed in my home directory. You can see all of them at http://www.pgsql.info/pg_win.html To start: #!/bin/sh echo echo "PostgreSQL starten:" postmaster -i -D /usr/share/postgresql/data & ps -f To stop: #!/bin/sh echo echo "PostgreSQL shutdown:" pg_ctl stop -w -D /usr/share/postgresql/data -s -m smart ps -f Regards Conni -- Datenbanklösungen + PostgreSQL + Webdesign http://www.cornelia-boenigk.de | http://www.pgsql.info http://www.dpunkt.de/buch/3-89864-175-9.html
Same thing happens if I close the window if started with 'postmaster' (btw is there a way to specify the log file this way?).
postmaster shows up in the services, but gives this message when trying to start:
'Could not start the postmaster service on Local Computer. The service did not return an error. This could be an interal Windows error or an internal service error.'
John
Justin Clift <justin@postgresql.org> wrote:
John Smith wrote:
> I just deleted the pid file and started PG again. I guess closing the
> window kills it?
Ahhh... you started PostgreSQL from a cygwin window with:
$ pg_ctl start
and then closed the window? It does seem to like keeping the window
open. Have you tried starting it using postmaster instead?
$ postmaster -D /path/to/your/data/directory -i
Not sure that will work, but it's a though.
When PostgreSQL is configured to start as a service, it seems to be much
easier. You can then just start it from the "Services" part of the
Windows control panel (depending which operating system you're using of
course).
:-)
Regards and best wishes,
Justin Clift
> John
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the c redit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now