Re: psql client does not handle WSAEWOULDBLOCK on Windows
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Ning <ning94803@gmail.com>, pgsql-hackers@lists.postgresql.org,
Andrew Dunstan <andrew@dunslane.net>
Date: 2025-10-05T19:14:44Z
Lists: pgsql-hackers
Attachments
- v2-0001-Use-SOCK_ERRNO-_SET-in-fe-secure-gssapi.c.patch (text/x-diff) patch v2-0001
I wrote: > Michael Paquier <michael@paquier.xyz> writes: >> Also, what about pqsecure_raw_write() in pqsecure_open_gss()? >> Shouldn't the same check apply? > Yeah, I think we pretty much need to use SOCK_ERRNO, SOCK_ERRNO_SET, > and SOCK_STRERROR (if relevant) throughout fe-secure-gssapi.c. Since nothing seems to be happening here, I took another look and decided that the required changes are really pretty straightforward. fe-secure-gssapi.c doesn't contain any strerror calls, and its touches of errno all appear to relate to socket errors, so we can just change them all. As attached. > Like you, I'm not really in a position to test this on Windows ... I'm still not, but it's straightforward enough that I'm willing to push on my own authority. I'll just put this up for long enough to make sure that the cfbot is happy with it --- though I think it's not building with GSSAPI on Windows, so that may prove little. regards, tom lane
Commits
-
Use SOCK_ERRNO[_SET] in fe-secure-gssapi.c.
- fc287cf3c4c9 13.23 landed
- f46d77377b9a 14.20 landed
- ea78bd6d5d0f 19 (unreleased) landed
- d83879a32b48 18.1 landed
- 771b106d1994 15.15 landed
- 46c4478db421 16.11 landed
- 1c4671f7b7c3 17.7 landed