how to stop running postgres process

From: Amit Kumar Khare <skamit2000(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: how to stop running postgres process
Date: 2002-02-22 07:43:07
Message-ID: 20020222074307.86589.qmail@web10103.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-02-22 09:05:20 Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2
Previous Message Jean-Michel POURE 2002-02-22 07:41:12 Re: [ODBC] UTF-8 data migration problem in Postgresql 7.2