Re: Correct "db-stop" Script

From: mike g <mike(at)thegodshalls(dot)com>
To: Daniel Secomb <dan(at)ds-d(dot)com>
Cc: zuhans(at)iname(dot)com, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Correct "db-stop" Script
Date: 2004-08-03 03:38:07
Message-ID: 1091504287.16772.14.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

The postmaster.pid file is created when postgres starts and destroyed
when it closes (normally).

If it can't find it then postgres was already shutdown or perhaps was
not running to begin with.

I believe in earlier post you received the wicked shmat error message
which no one seems to be able to overcome.... 8-(

On Mon, 2004-08-02 at 09:11, Daniel Secomb wrote:
> Hi Hans,
>
> Thanks for your valuable information regarding the "kill..." function. Does
> that significantly change the "db-stop" script?
>
> This is the "db-stop" script as I understand it to be at the moment:
>
> echo
> echo "PostgreSQL finishing..."
> pg_ctl stop -w -D /var/postgresql/data -s -m smart
> ps -f
> echo
> echo "cygserver finishing..."
> ps -f
> kill <process-number>
> ps -f
> kill <process-number>
> (until all processes have been killed)
>
>
> But when I typed the following in:
>
> $ echo
>
> $ echo "PostgreSQL finishing..."
> PostgreSQL finishing...
> $ pg_ctl stop -w -D /var/postgresql/data -s -m smart
>
>
> I got the following response:
>
> pg_ctl: could not find /var/postgresql/data/postmaster.pid
> Is postmaster running?
> $
>
>
> Weird eh? Any reason why it's doing that?
>
> Once again, your help is EXTREMELY appreciated!!!!
>
> Dan
>
>
> -----Original Message-----
> From: zuhans(at)iname(dot)com [mailto:zuhans(at)iname(dot)com]
> Sent: Saturday, July 31, 2004 3:11 AM
> To: Daniel Secomb
> Subject: initdb...
>
>
> hi dan,
>
> what i forgot to say:
> if you really type in one command after the other (so as to learn what's
> going on), then - instead of typing in "./db-stop" - you have to type in
> all commands from my "db-stop"-script-lines.
>
> but then the "kill..."-line won't work! instead just type in "ps -f",
> then you get the list of all processes running at the moment, remember
> the process-number of cygserver (very left coloumn of ps - output) and
> then type in: "kill <process-number>" (e.g. kill 3024). this makes a
> shutdown of cygserver.
>
> hope that helps!
> hans
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message Mos 2004-08-03 06:54:58 Initdb FATAL error shmat - Win98 Cygwin 1.5.10-3 - PostgreSQL 7.4.3
Previous Message mike g 2004-08-03 03:35:26 Re: initdb...