postgresql/src
Tom Lane b484ddf4d2 Treat ETIMEDOUT as indicating a non-recoverable connection failure.
Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS' list of "errnos that
identify hard failure of a previously-established network connection".
While one could imagine that this is sometimes recoverable, the same
could be said of other entries such as ENETDOWN.

In support of this, handle ETIMEDOUT on par with other socket errors
in relevant infrastructure, such as TranslateSocketError().
(I made a couple of cosmetic adjustments in TranslateSocketError(),
too.)  The code now assumes that ETIMEDOUT is defined everywhere,
which it should be given that POSIX has required it since SUSv2.

Perhaps this should be back-patched, but I'm hesitant to do so given
the lack of previous complaints, and the hazard that there's a small
ABI break on Windows from redefining the symbol.  Even if we decide
to do that, it'd be prudent to let this bake awhile in HEAD first.

Jelte Fennema

Discussion: https://postgr.es/m/AM5PR83MB01782BFF2978505F6D6C559AF7AA9@AM5PR83MB0178.EURPRD83.prod.outlook.com
2021-09-30 14:16:08 -04:00
..
backend Treat ETIMEDOUT as indicating a non-recoverable connection failure. 2021-09-30 14:16:08 -04:00
bin pgbench: Fix handling of socket errors during benchmark. 2021-09-29 21:48:52 +09:00
common Fix typos and grammar in code comments 2021-09-27 14:21:28 +09:00
fe_utils Skip trailing whitespaces when parsing integer options 2021-07-27 10:39:05 +09:00
include Treat ETIMEDOUT as indicating a non-recoverable connection failure. 2021-09-30 14:16:08 -04:00
interfaces Clear conn->errorMessage at successful completion of PQconnectdb(). 2021-09-13 16:53:11 -04:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Fix misevaluation of STABLE parameters in CALL within plpgsql. 2021-09-21 19:06:53 -04:00
port Treat ETIMEDOUT as indicating a non-recoverable connection failure. 2021-09-30 14:16:08 -04:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Repair two portability oversights of new test 2021-09-30 10:01:03 -03:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Fix WAL replay in presence of an incomplete record 2021-09-29 11:21:51 -03:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to Unicode 14.0.0 2021-09-15 08:16:44 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00