Re: DIAG [HY000] server closed the connection unexpectedly

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Jon Raiford' <Raiford(at)labware(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>, "pgsql-odbc-owner(at)postgresql(dot)org" <pgsql-odbc-owner(at)postgresql(dot)org>
Subject: Re: DIAG [HY000] server closed the connection unexpectedly
Date: 2016-10-24 03:02:08
Message-ID: 0A3221C70F24FB45833433255569204D1F635668@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi, Jon, Inoue-san

From: pgsql-odbc-owner(at)postgresql(dot)org
> [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Jon Raiford
> Here is an excerpt from my ODBC tracing on Windows. You can see that the
> error is being reported as 08001 instead of 08S01:
> v a14-135c EXIT SQLEndTran with return code -1
> (SQL_ERROR)
> SQLSMALLINT 2 <SQL_HANDLE_DBC>
> SQLHANDLE 0x0026CCC8
> SQLSMALLINT 0
>
> DIAG [08001] server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> (101)

Thanks, Jon. 08001 was set when the driver failed to send the query (COMMIT in this case.)

Inoue-san, the attached is a revised patch. I changed the error code to CONNECTION_COMMUNICATION_ERROR when PQsendQuery() fails.

Regards
Takayuki Tsunakawa

Attachment Content-Type Size
sqlstate_on_disconnection_v3.patch application/octet-stream 4.7 KB

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Fred Parkinson 2016-10-24 14:35:46 Re: xmin when linked tables are updated?
Previous Message Jon Raiford 2016-10-21 17:52:51 Re: DIAG [HY000] server closed the connection unexpectedly