Re: [Fwd: Abrupt close of pgsql backend]

From: "Scott Marlowe" <smarlowe(at)qwest(dot)net>
To: "Deepa K" <kdeepa(at)midascomm(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [Fwd: Abrupt close of pgsql backend]
Date: 2004-10-27 02:27:31
Message-ID: 1098844051.31930.41.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2004-10-25 at 23:00, Deepa K wrote:

> Hi,
> I am running postgresql 7.1.3 in RedHat Linux 7.2. From an external C
> application, three connections are established with postmaster (it is
> started with -i option) through unix sockets. Two times I received EPIPE
> error when trying to send a query to postmaster. This is because of the
> abrupt closure of pgsql backend.
>
> The query sent is formed dynamically and hence I'm unable to get
> the query whose processing may have led to such abrupt closure.

Were you running a later version, you'd have the option of logging your
queries. I don't think 7.1 supported that though.

> But this
> application is working for 2 years till now without any such
> problems. So I don't really suspect the query.

You may be having a bigger overall problem that is hard to see,
especially since 7.1 suffered from several conditions, like index
bloating, that the fix is reindexing the database.

> The postgresql todo lists that usage of views can lead to
> such abrupt closure. But there are no views used in my application.

You'll be glad to know views are MUCH more robust and performant since
7.1 was introduced.

> The last reason, for abnormal closure that I understand is if
> the hard disk is full. But this is also not the case under study.

Anything that could cause a major error or a backend crash could cause
your abnormal closures.

>
> Coming to the question,
> a. What are the (other) reasons for postmaster closing
> sockets abnormally?
>
> b. How can the application detect such a abnormal closure of
> socket?

You're asking a question about why an outdated version of PostgreSQL
that has known (and possible unknown) issues. While I'm sure folks will
be more than willing to try and help you, it's quite likely that many
problems you'll find in 7.1.x will have been fixed in the intervening
years, and the very real solution might wind up being an upgrade. If
you've already been thinking of upgrading, it might be worth trying it
now on a test server to see how it goes. If an upgrade isn't too hard,
it might be the easiest solution there is. And if it DOESN'T fix the
problem, people in the general (and then the hackers group if general
can't fix it,) will be much more interested in it.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2004-10-27 02:52:18 Re: list fieldnames in table? (from PHP)
Previous Message Naeem Bari 2004-10-27 01:24:56 Newbie question about casting literals - oracle/postgres