Subject: [pgjdbc/pgjdbc] PR #4009: [#2325] Execute queries as pipelined when running on virtual thread

From: "beikov (@beikov)" <[email-masked]>
Date: Thu, 26 Mar 2026 07:45:33 +0000

This is still a draft, because it doesn't work correctly yet. Maybe someone else can pick this up and finish it or point out what I might be missing. It seems that pipelining doesn't work yet, but I haven't verified the network interactions.

I'm also happy to receive early feedback :)

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

1. [ ] Does your submission pass tests?
2. [ ] Does `./gradlew styleCheck` pass ?
3. [ ] Have you added your new test classes to an existing test suite in alphabetical order?

### Changes to Existing Features:

* [ ] Does this break existing behaviour? If so please explain.
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?

---

From: "beikov (@beikov)" <[email-masked]>
Date: Thu, 26 Mar 2026 17:36:18 +0000

This prototype "seems" to work, but I'm not entirely happy with it yet. I tried to keep as much of the code as I could, but ultimately, I think it would be better to segment the various queues per virtual thread to avoid synchronization. See https://github.com/pgjdbc/pgjdbc/pull/4010