Re: RE: [PATCHES] Fix for ODBC close - Mailing list pgsql-odbc

From Bruce Momjian
Subject Re: RE: [PATCHES] Fix for ODBC close
Date
Msg-id 200102111317.IAA15884@candle.pha.pa.us
Whole thread Raw
In response to RE: RE: [PATCHES] Fix for ODBC close  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] Re: RE: [PATCHES] Fix for ODBC close
List pgsql-odbc
> > -----Original Message-----
> > From: Bruce Momjian
> >
> > OK, I have a pretty good guess about the cause of the ODBC shutdown
> > failure message in the server logs.  Sending 'X' is still causing the
> > error message.
> >
> > The error you are seeing is from the backend libpq code, the area that
> > communicates with clients.
> >
> > while ODBC closes with:
> >
> >         SOCK_put_char(self, 'X');
> >         SOCK_flush_output(self);
> >
>
> Probably you have to put above code before calling
> shutdown() not after.  shutdown(sock, 2) disables
> both sends and receives on the socket.

Thanks.  I was so focused on close() I never noticed the shutdown().
Can someone please test now?

Hiroshi, should I be concerned that a send() that does not send the full
packet just returns an error and does not retry?  Is libpq() so complex
because of async connections?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-odbc by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: RE: [PATCHES] Fix for ODBC close
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: RE: [PATCHES] Fix for ODBC close