ABRUPT CLOSURE OF POSTGRESQL SOCKET

From: "Deepa K" <kdeepa(at)midascomm(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: ABRUPT CLOSURE OF POSTGRESQL SOCKET
Date: 2004-10-27 14:22:10
Message-ID: 1577.192.168.13.85.1098886930.squirrel@192.168.13.85
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

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. But
this application is working for 2 years till now without any such
problems. So I don't really suspect the query.

The postgresql todo lists that usage of views can lead to
such abrupt closure. But there are no views used in my application.
The another possbile reason for abnormal closure that I understand
is if the hard disk is full. But this is also not the case.

Pgsql log shows the following message :
=====================================

DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
NOTICE: RelationBuildDesc: can't open pg_trigger: Too many open files in
system
pq_recvbuf: unexpected EOF on client connection
DEBUG: proc_exit(0)
DEBUG: shmem_exit(0)
DEBUG: exit(0)
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: CleanupProc: pid 28312 exited with status 11
Server process (pid 28312) exited with status 11 at Wed Oct 27 17:00:02 2004
Terminating any active server processes...
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28250
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28248
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28204
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 28162
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20173
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20171
/usr/bin/postmaster: CleanupProc: sending SIGQUIT to process 20170
/usr/bin/postmaster: CleanupProc: pid 28162 exited with status 0
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: ServerLoop: handling reading 5
/usr/bin/postmaster: ServerLoop: handling reading 5
NOTICE: Message from PostgreSQL backend:
The Postmaster has informed me that some other backend died
abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to
terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
/usr/bin/postmaster: reaping dead processes...

Coming to the question,
======================

a. What could be the reason for abnormal closure of postmaster
socket?
b. How can the application detect such a abnormal closure of
socket?

--
regards,
Deepa K

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Uhal 2004-10-27 14:48:57 Foreign Key Non-Null Problem in 8.0
Previous Message Daniel Savard 2004-10-27 14:19:02 Array values and foreign keys

Browse pgsql-novice by date

  From Date Subject
Next Message Paul Daniels 2004-10-27 14:30:23 using postgreSQL with MS-IIS and eGroupWare
Previous Message Bruno Wolff III 2004-10-27 13:25:25 Re: Simple function question