pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3693: Overhead of uncontended use of ResourceLock
Date: Tue, 01 Jul 2025 15:50:38 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Apparently, the major part of `ResourceLock` overhead comes from
* `org.postgresql.core.QueryExecutorBase#setTransactionState` (we could make a private variation that does not grab the lock)
* `LruCache.borrow/put` <-- we could replace this with `synchronized` (the cache does not execute IO, so it is loom-safe with all JDKs)
* `org.postgresql.jdbc.PgStatement#executeInternal` <-- this is probably executed under a lock, thus synchronization there might be removed
I wonder if it can make noticeable difference with benchmark like https://github.com/pgjdbc/pgjdbc/blob/5be3c937cc6bdc1c753634881195cf0a0f7bb8c1/benchmarks/src/jmh/ja...
<img width="882" alt="Image" src="https://github.com/user-attachments/assets/33be4915-bf6c-45c2-bb6b-8c956cc46384"; />
<img width="882" alt="Image" src="https://github.com/user-attachments/assets/166bac79-301f-41c0-9533-a96fed1966bf"; />
view thread (14+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3693: Overhead of uncontended use of ResourceLock
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox