From: Olivier Bourgain <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] c14439: perf: enable tcpNoDelay by default (#2495)
Date: Thu, 21 Apr 2022 02:03:50 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/a7e8a3-c14439@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: c144392f79a2e5d7f62bd9164ca7dc18438159c3
https://github.com/pgjdbc/pgjdbc/commit/c144392f79a2e5d7f62bd9164ca7dc18438159c3
Author: Olivier Bourgain <olivierbourgain02@gmail.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@idiom.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] c14439: perf: enable tcpNoDelay by default (#2495)
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/a7e8a3-c14439@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/a7e8a3-c14439@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox