From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Simplify waiting logic in reading from / writing to client.
Date: Fri, 13 Feb 2015 19:51:56 +0000
Message-ID: <E1YMMHM-0004JR-2m@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Simplify waiting logic in reading from / writing to client.
The client socket is always in non-blocking mode, and if we actually want
blocking behaviour, we emulate it by sleeping and retrying. But we have
retry loops at different layers for reads and writes, which was confusing.
To simplify, remove all the sleeping and retrying code from the lower
levels, from be_tls_read and secure_raw_read and secure_raw_write, and put
all the logic in secure_read() and secure_write().
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/80788a431e9bff06314a054109fdea66ac538199
Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 81 +++++--------------
src/backend/libpq/be-secure.c | 143 +++++++++++++--------------------
src/backend/libpq/pqcomm.c | 3 +-
src/include/libpq/libpq-be.h | 4 +-
4 files changed, 79 insertions(+), 152 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Simplify waiting logic in reading from / writing to client.
In-Reply-To: <E1YMMHM-0004JR-2m@gemulon.postgresql.org>
References: <E1YMMHM-0004JR-2m@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox