Re: "unexpected EOF" messages

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: simon(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: "unexpected EOF" messages
Date: 2012-05-03 14:48:12
Message-ID: CABUevExhiyFodmYLJXM6aGEgjvEM63GPrQiY27PsLVG3t7-k6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2012 at 2:46 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Magnus Hagander  wrote:
>
>> Also, AFAIK we don't *have* a "message type" at this point (one of
>> the things said mythical project wanted to look at), so the only
>> thing we could really filter on would be the whole text of the
>> message, no?
>
> We have SQLSTATE, but this seems to be one of those situations where
> we've been sloppy about using the right value.  We seem to be using
> '08P01' (protocol_violation), which is also used for finding the
> wrong bytes on a working connection.  It seems to me a broken
> connection is exactly the case where you would expect to see '08006'
> (connection_failure).  FWIW, there are also specific exceptions for
> rejecting a connection attempt, and for attempting to send something
> when no connection exists.
>
> We don't need to invent new mechanisms for categorizing messages; we
> just need to start consistently using the one we have correctly.

While it might work a bit for this one, do we really expect to be able
to map a single SQLSTATE to each single message at any point? Unless
we can do that, it's never going to "go all the way" - though it might
still be useful of course.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-05-03 14:49:41 Re: "unexpected EOF" messages
Previous Message Andrew Dunstan 2012-05-03 14:44:57 Re: How hard would it be to support LIKE in return declaration of generic record function calls ?