Skip site navigation (1) Skip section navigation (2)

Re: Non-blocking communication between a frontend and a backend (pqcomm)

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Non-blocking communication between a frontend and a backend (pqcomm)
Date: 2009-07-22 07:56:47
Message-ID: 3f0b79eb0907220056m7209ade9m1a517a2f84d060e5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

On Wed, Jul 22, 2009 at 2:20 AM, Robert Haas<robertmhaas(at)gmail(dot)com> wrote:
> Fujii Masao,
>
> Are you planning to update this patch based on Martin's review?

Sure. Attached is an updated patch.

> On Fri, Jul 17, 2009 at 5:26 PM, Martin Pihlak<martin(dot)pihlak(at)gmail(dot)com> wrote:
>> Here's my initial review of the non-blocking pqcomm patch. The patch applies
>> cleanly and passes regression. Generally looks nice and clean. Couple of remarks
>> from the department of nitpicking:

Thanks for reviewing the patch!

>> * In secure_poll() the handling of timeouts is different depending whether
>>  poll(), select() or SSL_pending() is used. The latter doesn't use the
>>  timeout value at all, and for select() it is impossible to specify indefinite
>>  timeout.

Fixed. I tweaked the handling of the fifth argument 'timeout' of select(); when
a negative number is specified to a timeout of secure_poll(), NULL is set to
that 'timeout', which can block select() indefinitely.

Since SSL_pending() doesn't wait for data to arrive (i.e., doesn't use timeout),
I didn't change the code related to that function.

>> * occasional "blank" lines consisting of a single tab character -- maybe
>>  a left-over from editor auto-indent. Not sure of how much a problem this
>>  is, given that the blanks will be removed by pg_indent.

Fixed.

>> * Comment on pq_wait() seems to have a typo: "-1 if an error directly."

Fixed.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment: nonblocking_pqcomm_0722.patch
Description: application/octet-stream (8.2 KB)

In response to

Responses

pgsql-hackers by date

Next:From: KaiGai KoheiDate: 2009-07-22 08:30:55
Subject: Re: [PATCH] SE-PgSQL/tiny rev.2193
Previous:From: Peter EisentrautDate: 2009-07-22 07:45:01
Subject: Re: [PATCH] SE-PgSQL/tiny rev.2193

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group