Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-odbcpgsql-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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-02-11 13:24:38
Subject: Re: ODBC backward versions
Previous:From: Hiroshi InoueDate: 2001-02-11 13:11:46
Subject: RE: ODBC backward versions

pgsql-odbc by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group