pgsql/src/interfaces/libpq fe-connect.c fe-exe ...

Started by Bruce Momjian - CVSabout 25 years ago6 messagescomitters
Jump to latest
#1Bruce Momjian - CVS
momjian@hub.org

CVSROOT: /home/projects/pgsql/cvsroot
Module name: pgsql
Changes by: momjian@hub.org 01/07/20 13:45:06

Modified files:
src/interfaces/libpq: fe-connect.c fe-exec.c fe-misc.c win32.h

Log message:
i've spotted a following problem using DBD::Pg under win32. winsock
functions do not set errno, so some normal conditions are treated as
fatal errors. e.g. fetching large tuples fails, as at some point recv()
returns EWOULDBLOCK. here's a patch, which replaces errno with
WSAGetLastError(). i've tried to to affect non-win32 code.

Dmitry Yurtaev

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian - CVS (#1)
Re: pgsql/src/interfaces/libpq fe-connect.c fe-exe ...

Bruce Momjian - CVS <momjian@hub.org> writes:

Log message:
i've spotted a following problem using DBD::Pg under win32. winsock
functions do not set errno, so some normal conditions are treated as
fatal errors. e.g. fetching large tuples fails, as at some point recv()
returns EWOULDBLOCK. here's a patch, which replaces errno with
WSAGetLastError(). i've tried to to affect non-win32 code.

I thought this was awaiting a merged patch from both submitters?

Certainly I haven't reviewed it, since I thought that we were not
going to apply it until that happened.

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pgsql/src/interfaces/libpq fe-connect.c fe-exe ...h

Bruce Momjian - CVS <momjian@hub.org> writes:

Log message:
i've spotted a following problem using DBD::Pg under win32. winsock
functions do not set errno, so some normal conditions are treated as
fatal errors. e.g. fetching large tuples fails, as at some point recv()
returns EWOULDBLOCK. here's a patch, which replaces errno with
WSAGetLastError(). i've tried to to affect non-win32 code.

I thought this was awaiting a merged patch from both submitters?

Certainly I haven't reviewed it, since I thought that we were not
going to apply it until that happened.

The other maintainer said this patch was better. He wants a few lines
of his patch added as well and he will send that over soon. You want to
see the applied patch or have it backed out?

-- 
  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
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: pgsql/src/interfaces/libpq fe-connect.c fe-exe ...h

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I thought this was awaiting a merged patch from both submitters?

The other maintainer said this patch was better.

Oh, I guess I missed that message.

He wants a few lines
of his patch added as well and he will send that over soon. You want to
see the applied patch or have it backed out?

No, I'll just look at the combined diff once both patches are in.

regards, tom lane

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: pgsql/src/interfaces/libpq fe-connect.c fe-exe ...h

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I thought this was awaiting a merged patch from both submitters?

The other maintainer said this patch was better.

Oh, I guess I missed that message.

It only came to me. Sometimes I don't check to see the user told
everyone in the email.

He wants a few lines
of his patch added as well and he will send that over soon. You want to
see the applied patch or have it backed out?

No, I'll just look at the combined diff once both patches are in.

OK. I was getting worried that no one was merging the patches in the
queue and then yesterday both people came through.

-- 
  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
#6Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pgsql/src/interfaces/libpq fe-connect.c fe-exe ...

Bruce Momjian - CVS <momjian@hub.org> writes:

Log message:
i've spotted a following problem using DBD::Pg under win32. winsock
functions do not set errno, so some normal conditions are treated as
fatal errors. e.g. fetching large tuples fails, as at some point recv()
returns EWOULDBLOCK. here's a patch, which replaces errno with
WSAGetLastError(). i've tried to to affect non-win32 code.

I thought this was awaiting a merged patch from both submitters?

Certainly I haven't reviewed it, since I thought that we were not
going to apply it until that happened.

I have applied both fixes. Win32 users can start testing.

-- 
  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