bug

Started by Sandeep Joshiover 25 years ago2 messagesbugs
Jump to latest
#1Sandeep Joshi
sjoshi@Zambeel.com

Your name : Sandeep Joshi
Your email address : sjoshi@zambeel.com

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.16-3

PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.3

Compiler used (example: gcc 2.8.0) : egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)

Please enter a FULL description of your problem:
------------------------------------------------

1. If I kill postmaster then if I try to restart then I get errors
saying it is
already running.

pg_ctl: It seems another postmaster is running. Try to start postmaster
anyway.
FATAL: StreamServerPort: bind() failed: Address already in use
Is another postmaster already running on that port?
If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
/work/postgres/bin/postmaster: cannot create UNIX stream port
pg_ctl: Cannot start postmaster. Is another postmaster is running?

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

pg_ctl start
ps auxww | grep postmaster
kill -9 $pid
pg_ctl start

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

pg_ctl should check whether the process and socket specified does exist
or not.

#2Chris
linux.fellow@libertysurf.fr
In reply to: Sandeep Joshi (#1)
Re: bug

Sandeep Joshi wrote:

1. If I kill postmaster then if I try to restart then I get errors
saying it is
already running.

pg_ctl start
ps auxww | grep postmaster
kill -9 $pid
pg_ctl start

It is clearly written in the docs that a server MUST NOT be killed with SIGKILL,
because there's a risk of loosing datas. If you want to kill the server, use
'kill $pid' (or if you really want to specify a signal, use SIGTERM: number 15)

FYI, the signal 9 kills an app without giving her an info, so the server cannot
exit cleanly. The signal 15 was then defined in that way : is asks the app to
terminate.

hope this helped you...