diff --git a/SOURCES/postgresql-9.2.24-handle-EAGAIN-on-socket-write.patch b/SOURCES/postgresql-9.2.24-handle-EAGAIN-on-socket-write.patch new file mode 100644 index 0000000..f733aea --- /dev/null +++ b/SOURCES/postgresql-9.2.24-handle-EAGAIN-on-socket-write.patch @@ -0,0 +1,26 @@ +From ab371f752536e88307b2c6867d6821ec1397525e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= +Date: Fri, 24 Jan 2020 01:04:48 +0100 +Subject: [PATCH] Handle EAGAIN error on socket write + + See BZ#1754816 +--- + src/backend/libpq/be-secure.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c +index f6d9bc50c7..5af1f15239 100644 +--- a/src/backend/libpq/be-secure.c ++++ b/src/backend/libpq/be-secure.c +@@ -522,7 +522,7 @@ my_sock_write(BIO *h, const char *buf, int size) + BIO_clear_retry_flags(h); + if (res <= 0) + { +- if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + { + BIO_set_retry_write(h); + } +-- +2.24.1 + diff --git a/SPECS/postgresql.spec b/SPECS/postgresql.spec index 121b4a8..0fa50bc 100644 --- a/SPECS/postgresql.spec +++ b/SPECS/postgresql.spec @@ -63,7 +63,7 @@ Summary: PostgreSQL client programs Name: postgresql %global majorversion 9.2 Version: 9.2.24 -Release: 2%{?dist} +Release: 4%{?dist} # The PostgreSQL license is very similar to other MIT licenses, but the OSI # recognizes it as an independent license, so we do as well. @@ -138,6 +138,9 @@ Patch14: postgresql-CVE-2018-10915.patch # Check if callback is already set Patch15: postgresql-libpq-crypto-no-callback-stomping-v2.patch +# See BZ#1754816 +Patch16: postgresql-9.2.24-handle-EAGAIN-on-socket-write.patch + BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk help2man BuildRequires: perl(ExtUtils::Embed), perl-devel BuildRequires: readline-devel zlib-devel @@ -377,6 +380,7 @@ benchmarks. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 # We used to run autoconf here, but there's no longer any real need to, # since Postgres ships with a reasonably modern configure script. @@ -1174,6 +1178,9 @@ fi %endif %changelog +* Fri Jan 24 2020 Patrik Novotný - 9.2.24-4 +- Patch fixing BZ#1754816: handle EAGAIN error on socket write + * Tue Nov 5 2019 Filip Januš 9.2.24-2 - Check if callback is already set Resolves: #1755154