Re: tcp port - Mailing list pgsql-admin

From Michiel Lange
Subject Re: tcp port
Date
Msg-id 4053506E.5090506@minas.demon.nl
Whole thread Raw
In response to Re: tcp port  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-admin
It is possible that due some weird stuff the port is not made free...
check with

$ netstat --all --numeric-ports -p | grep 5432

this -for example- is my output:
tcp        0      0 0.0.0.0:5432            0.0.0.0:*
LISTEN      12775/postmaster
unix  2      [ ACC ]     STREAM     LISTENING     24015
12775/postmaster    /tmp/.s.PGSQL.5432

If there is output, then check the PID which is just before the slash,
in this case 12775

$ ps 12775

output:
  PID TTY      STAT   TIME COMMAND
12775 ?        S      0:00 /usr/local/pgsql/bin/postmaster -i

As you can see: there is a postmaster running
You might want to try to kill -TERM the process... don't use kill -KILL
(or kill -9) on a running database, as you may very well very much
damage your database...
Don't use kill -SEGV either! It's even more devastating...
kill -TERM is a request to shutdown as soon as possible. The process is
allowed to shut down nicely and neatly.
kill -KILL is an order to stop immediately. There's no buffer flushing,
finishing writes etc etc
kill -SEGV tells the program it made a segmentation fault and it crashed
(core dump situation)

hope this information helps...

Peter Eisentraut wrote:

>philippe haas wrote:
>
>
>>port 5432 (postmaster postgres reserved) on my machine(suze 8.2),
>>with PostgreSQL 7.4.1 ) is unreachable
>>When i launche postmaster with tcp/op option, i've the message :
>>LOG:  could not bind IPv4 socket: Address already in use.
>>HINT:  Is another postmaster already running on port 5432? If not,
>>wait a few seconds and retry.
>>
>>
>
>You can ignore this problem.  Notice that it does not say "ERROR"
>anywhere.
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>
>


pgsql-admin by date:

Previous
From: Daniel Rubio
Date:
Subject: Restore problems due to changed table names
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: [PERFORM] syslog slowing the database?