From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Steve Singer <ssinger_pg(at)sympatico(dot)ca> |
Cc: | Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: libpq SSL with non-blocking sockets |
Date: | 2011-06-27 14:25:09 |
Message-ID: | BANLkTikbfkGCJuyiUdr=GOfjTc7=3q3x1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 24, 2011 at 5:14 PM, Steve Singer <ssinger_pg(at)sympatico(dot)ca> wrote:
> A few things I noticed (that you might be aware of since you mentioned it
> needs cleanup)
>
> -The patch doesn't compile with non-ssl builds, the debug at the bottom of
> PQSendSome isn't in an #ifdef
>
> -I don't think your handling the return code properly. Consider this case.
>
> pqSendSome(some data)
> sslRetryBuf = some Data
> return 1
> pqSendSome(more data)
> it sends all of 'some data'
> returns 0
>
> I think 1 should be returned because all of 'more data' still needs to be
> sent. I think returning a 0 will break PQsetnonblocking if you call it when
> there is data in both sslRetryBuf and outputBuffer.
> We might even want to try sending the data in outputBuffer after we've sent
> all the data sitting in sslRetryBuf.
>
>
> If you close the connection with an outstanding sslRetryBuf you need to free
> it.
Based on these comments, I have updated the status of the patch to
"Waiting on Author".
https://commitfest.postgresql.org/action/patch_view?id=594
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-06-27 14:32:36 | Re: heap_hot_search_buffer refactoring |
Previous Message | Robert Haas | 2011-06-27 14:13:38 | reducing the overhead of frequent table locks, v4 |