Subject: Problem with the Postgres backend

From: [email-masked] (Marc Mazuhelli)
Date: Tue, 19 Nov 91 22:17:51 EST

Hi there,
 
I'm pretty new to Postgres.  I'm the system administrator of a network
of Sun computers in the department of math and computer science.
 
I have installed Postgres version 3 and it's beginning to get used by
our students.  Today I had a problem that I couldn't resolve and I am
asking for your help.
 
A few users came and told me that they had the message that "the backend
is not responding".  Thinking that the backend is the process started
with the postmaster command, I did a "ps aux|grep postmaster" and saw
that it was running.
 
So I decided to restart it.  I did a "su - postgres" followed by "cd
bin" and "postmaster &" and received a message like "can't bind to
port".  I said "of course, the old postmaster is still there", so I
killed it and tried to restart it but had the same message everytime I
tried: "can't bind to port".  And since I had killed the old postmaster,
I was stuck with no postmaster at all!
 
I even tried a "ipcclean" (or something like that) and it didn't fix
the problem.
 
I guess that if I had rebooted the machine, it would have fixed the
problem, but I hope there's a less drastic way of fixing that problem
and if so, I want to learn it!
 
I am running postgres version 3 on a Sparc Station 2 using SunOS 4.1.1.
 
Thank you very much for your help.

-- 
{  Marc Mazuhelli                 |  analyst in charge of computer labs     }
{  internet: [email-masked]   |  Departement of math and comp. science  }
{  <this space intentionaly ..    |  Universite de Sherbrooke               }
{                 ... left blank> |  Sherbrooke, Quebec, Canada             }

---

From: postarch (Postgres Mailing Archive)
Date: Wed, 20 Nov 91 13:02:53 PST

> I even tried a "ipcclean" (or something like that) and it didn't fix

The response given by [email-masked] is right.  If there's no other
postmaster running and you still can't bind to the port the socket hasn't
been cleared.  You should make sure there are no backend processes still
hanging around.  When postgres processes die unnaturally the socket isn't
always closed.  It can take some time before things time out.

Jeff Meredith
[email-masked]