| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | "ryanewang(王蕾)" <ryanewang(at)tencent(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Reduce the instruction overhead of OpenSSL calls |
| Date: | 2025-03-04 09:36:08 |
| Message-ID: | 751A4F25-79A6-425B-8323-C626BD300875@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 27 Feb 2025, at 14:16, ryanewang(王蕾) <ryanewang(at)tencent(dot)com> wrote:
>
> Hi,
> From the openssl documentation, when the value of ret is greater than 0, the SSL_get_error() function returns SSL_ERROR_NONE.
> So, it seems that when the return value of SSL_read() or SSL_write() function is greater than 0, we don't need to make an error judgment.
> The attached patch attempts to reduce unnecessary error judgments.
Calling SSL_get_error() is needed to clear the error queue for subsequent IO
operations, so I don't skipping it would be wise. I imagine that any overhead
is dwarfed by the time spent in network IO anyways.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josef Šimánek | 2025-03-04 09:40:04 | Re: tests for pg_stat_progress_copy.tuples_skipped |
| Previous Message | Anthonin Bonnefoy | 2025-03-04 09:31:46 | Re: Add Pipelining support in psql |