how to stop running postgres process - Mailing list pgsql-hackers

From Amit Kumar Khare
Subject how to stop running postgres process
Date
Msg-id 20020222074307.86589.qmail@web10103.mail.yahoo.com
Whole thread Raw
Responses Re: how to stop running postgres process
Re: how to stop running postgres process
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Next
From: Tatsuo Ishii
Date:
Subject: Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2