Re: psql & "unexpected EOF on client connection"

From: gateley(at)jriver(dot)com
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql & "unexpected EOF on client connection"
Date: 2001-02-05 15:02:08
Message-ID: 3A7EC070.70BFD0A7@jriver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
>
> gateley(at)jriver(dot)com writes:
> > I have been getting the dreaded "unexpected EOF on client
> > connection" in my system logs, but the surprising thing is that
> > it comes from psql (I think). I am executing psql
> > via a 'system' system call, and about 1 time out of 20 I get
> > the "unexpected EOF" message. Unfortunately, this
> > also causes the 'system' call to return an error, even though
> > all SQL code was executed properly. (After searching
> > postgresql.org I found out that the message normally
> > means that PGfinish wasn't called.)
>
> So it does. I didn't think there were any paths in psql that would
> lead to such an ungraceful exit, especially not if no SQL error occurs.
>
> > Gory details available on request.
>
> Please. For starters, what platform are you on, and which PG version?

RedHat Linux 7.0, with kernel 2.2.17
Postgresql version 7.0.3, as well as the stock
version shipped with RedHat 7 (7.0.1???)

My app gathers a bunch of data, and then
dumps it into the database. It does not
retrieve any data from the database (other
apps do that). About 1 time out of 20, the call
to PGconnectdb fails with a segfault signal. Because
of this, I run the PGconnectdb/PGexec etc. in a
forked process. If the forked process dies because
of the signal, then I try using system("psql ....")
as described above. About 1 time out of 20 this
fails.

Thanks,

j

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-02-05 15:31:37 Re: psql & "unexpected EOF on client connection"
Previous Message Karel Zak 2001-02-05 09:10:08 Re: insert char(1) type by different ways.