Re: DIAG [HY000] server closed the connection unexpectedly - Mailing list pgsql-odbc

From Tsunakawa, Takayuki
Subject Re: DIAG [HY000] server closed the connection unexpectedly
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6349C4@G01JPEXMBYT05
Whole thread Raw
In response to Re: DIAG [HY000] server closed the connection unexpectedly  ("Jon Raiford" <Raiford@labware.com>)
Responses Re: DIAG [HY000] server closed the connection unexpectedly
List pgsql-odbc
Hi, Jon, Inoue-san,

Inoue-san,
The attached patch is rebased on HEAD.


Jon,

From: Jon Raiford [mailto:Raiford@labware.com]
> Yes, I can see that the code does answer 08S01, however it is being reported
> as 08001 to the application.  This can be seen even in the ODBC trace.  I'm
> not sure why it is changed.  Maybe this is a symptom of a bigger problem?

Didn't the 08001 get returned after you failed to reconnect?  As follows, I got 08S01 when I killed backend while it
wasrunning an SQL statement (e.g. SELECT pg_sleep(1000)). 

[isql command of unixODBC]
$ isql -v postgres
...
SQL> select pg_sleep(1000);
[ISQL]ERROR: Could not SQLExecute
[08S01]server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
;
The connection has been lost
SQL>

[my test app using SQLExecDirect]
08S01: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
;
The connection has been lost

Regards
Takayuki Tsunakawa



Attachment

pgsql-odbc by date:

Previous
From: "Fred Parkinson"
Date:
Subject: Re: xmin when linked tables are updated?
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: [RFC] Changing the default of UseDeclareFetch and Protocol (statement -> transaction rollback)