Re: Simplify sleeping while reading/writing from client

From: Andres Freund <andres(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Simplify sleeping while reading/writing from client
Date: 2015-02-06 09:50:21
Message-ID: 20150206095021.GC24534@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-02-05 16:45:50 +0200, Heikki Linnakangas wrote:
> Looking again at the code after Andres' interrupt-handling patch series, I
> got confused by the fact that there are several wait-retry loops in
> different layers, and reading and writing works slightly differently.

They don't really work all that differently?

> I propose the attached, which pulls all the wait-retry logic up to
> secure_read() and secure_write(). This makes the code a lot more
> understandable.

Generally a good idea. Especially if we get more ssl implementations.

But I think it'll make the already broken renegotiation handling even
worse. Because now we're always entering do_handshake in nonblocking
mode (essentially).

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-02-06 10:42:43 Re: Simplify sleeping while reading/writing from client
Previous Message Heikki Linnakangas 2015-02-06 09:46:01 Re: Simplify sleeping while reading/writing from client