| From: | Olivier Bourgain <noreply(at)github(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
| Subject: | [pgjdbc/pgjdbc] c14439: perf: enable tcpNoDelay by default (#2495) |
| Date: | 2022-04-21 09:03:50 |
| Message-ID: | pgjdbc/pgjdbc/push/refs/heads/master/a7e8a3-c14439@github.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: c144392f79a2e5d7f62bd9164ca7dc18438159c3
https://github.com/pgjdbc/pgjdbc/commit/c144392f79a2e5d7f62bd9164ca7dc18438159c3
Author: Olivier Bourgain <olivierbourgain02(at)gmail(dot)com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M docs/documentation/head/connect.md
M pgjdbc/src/main/java/org/postgresql/PGProperty.java
M pgjdbc/src/main/java/org/postgresql/core/PGStream.java
Log Message:
-----------
perf: enable tcpNoDelay by default (#2495)
In [#2341](https://github.com/pgjdbc/pgjdbc/pull/2341) the option to
configure tcpNoDelay was added, with a default value of false.
The previous value of this setting was true, as set in
PGStream.changeSocket(Socket) with the following code:
```
// Submitted by Jason Venner <jason(at)idiom(dot)com>. Disable Nagle
// as we are selective about flushing output only when we
// really need to.
connection.setTcpNoDelay(true);
```
`changeSocket()` is called from the `PGStream` constructor, which is
called in `ConnectionFactoryImpl`, and then later we overwrite the value
with the one from the properties.
We had a performance issue when upgrading from 42.2.24 to 42.3.3, and we suspected the
issue in 42.3.2 and confirmed that by passing the property `tcpNoDelay=true` to the driver,
the performance issue was fixed.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Olivier Bourgain | 2022-04-21 10:56:50 | [pgjdbc/pgjdbc] ffda18: docs: fix readme.md after #2495 (#2496) |
| Previous Message | Dave Cramer | 2022-04-15 19:49:33 | [pgjdbc/pgjdbc] a7e8a3: move version to 42.3.5 (#2493) |