Re: [ODBC] RE: [PATCHES] Fix for ODBC close

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, PostgreSQL odbc list <pgsql-odbc(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [ODBC] RE: [PATCHES] Fix for ODBC close
Date: 2001-02-11 13:17:13
Message-ID: 200102111317.IAA15884@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc pgsql-patches

> > -----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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-02-11 13:24:38 Re: ODBC backward versions
Previous Message Hiroshi Inoue 2001-02-11 13:11:46 RE: ODBC backward versions

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2001-02-11 18:19:17 Re: Re: [ODBC] RE: [PATCHES] Fix for ODBC close
Previous Message Hiroshi Inoue 2001-02-11 13:10:56 RE: [ODBC] RE: [PATCHES] Fix for ODBC close

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-02-11 18:19:17 Re: Re: [ODBC] RE: [PATCHES] Fix for ODBC close
Previous Message Hiroshi Inoue 2001-02-11 13:10:56 RE: [ODBC] RE: [PATCHES] Fix for ODBC close