[pgjdbc/pgjdbc] e2623d: perf: fix 1ms per async CopyAPI (regression since ...

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] e2623d: perf: fix 1ms per async CopyAPI (regression since ...
Date: 2018-10-25 07:11:30
Message-ID: 5bd16ca23a94f_47d62ac01b96e5782083f@hookshot-fe-d252ca1.cp1-iad.github.net.mail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: e2623d63d4b6fad0b12fb9ace842475e4a9134dc
https://github.com/pgjdbc/pgjdbc/commit/e2623d63d4b6fad0b12fb9ace842475e4a9134dc
Author: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Date: 2018-10-25 (Thu, 25 Oct 2018)

Changed paths:
M CHANGELOG.md
M docs/_posts/2018-08-27-42.2.5-release.md
M pgjdbc/src/main/java/org/postgresql/core/PGStream.java
M pgjdbc/src/main/java/org/postgresql/core/v3/CopyDualImpl.java
M pgjdbc/src/main/java/org/postgresql/core/v3/replication/V3ReplicationProtocol.java

Log Message:
-----------
perf: fix 1ms per async CopyAPI (regression since 42.2.5) (#1314)

The problem is SSL sockets use buffers for input, and `stream#available()` might easily return 0 even though the data is available in the downstream socket. The only viable WA is to perform `read` calls, however it might impact performance (e.g. for async copy operations). The resolution is to throttle read calls for copy api, and keep 1ms reads for replication api.

fixes #1312

**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Alexander Kjäll 2018-10-28 14:38:28 Maybe time for an alpha release of the pgsql2 project
Previous Message Dave Cramer 2018-10-24 11:30:46 Re: Query related to postgresql jdbc 42.2.5