how to stop running postgres process

Поиск
Список
Период
Сортировка
Искать

how to stop running postgres process

От:
Amit Kumar Khare <skamit2000@yahoo.com>
Дата:
Hi All,

Here are some stupid questions. Please don't get
annoyed answering them.

(1) I ran postgres in interactive mode. it showed me 
"backend>" prompt. now how to get out of it? I tried
q,quit,stop, shutdown etc but it did not worked.

(2) now the problem is the process is running in the
backend and now if I start postmaster again it gives
me the following error

//
pg_ctl: Cannot restart postmaster.  postgres is
running (pid: 5559)
Please terminate postgres and try again.
//

I tried 
kill 'cat
/usr/dcs/projects/cs411/cs411g4/pgsql/data/postmaster.pid'
but following error came

kill: Arguments should be jobs or process id's.

then I tried

kill -9 5559

but it gives me following message
5559: No such process

The postmaster.pid file exist in the data directory
and the cat command shows me this

-5559
/usr/dcs/projects/cs411/cs411g4/pgsql/data

so How to stop this process?

(3) Please can you give me the sequence of commands
for running postgres in debugging mode . I have to
trace query execution right from ProcessQuery()
function in postgres.c. FAQ's item 3.7 gives
description only which is not for me who is not a unix
guru.

I tried gdb postgres
then run -B 32 -d 5 mp2

I lost my gdb prompt and I was under backend> 
and could not get out of it

(4) I suggest if you can post some where a sample
session describing the debugging process etc. it will
help a lot for people like me who has just stepped
into the postgreSQL.

Thanks in advance for your help and time

Regards
Amit khare



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Re: how to stop running postgres process

От:
Doug McNaught <doug@wireboard.com>
Дата:
Amit Kumar Khare  writes:

> (2) now the problem is the process is running in the
> backend and now if I start postmaster again it gives
> me the following error

Use 'ps' to find the PID of the running 'postgres' process and kill
it.

-Doug
-- 
Let us cross over the river, and rest under the shade of the trees.  --T. J. Jackson, 1863

Re: how to stop running postgres process

От:
Ola Sundell <ola@miranda.org>
Дата:
On Thu, 21 Feb 2002, Amit Kumar Khare wrote:

> Hi All,
> 
> Here are some stupid questions. Please don't get
> annoyed answering them.



If ps ax | grep postmaster yields nothing, just delete the postmaster.pid
file, and start postmaster. An incorrect shutdown leaves the
postmaster.pid file hanging.

Ola

-- 
Ola Sundell
ola@miranda.org - olas@wiw.org - ola.sundell@personalchemistry.com
http://miranda.org/~ola


Re: how to stop running postgres process

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Amit Kumar Khare  writes:
> (1) I ran postgres in interactive mode. it showed me 
> "backend>" prompt. now how to get out of it?

Control-D.  See the postgres reference page:
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/app-postgres.html
		regards, tom lane

FAQ