pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: strelec (@strelec) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #3938: Documentation is conflicting if the drier is thread safe.
Date: Thu, 12 Feb 2026 11:37:53 +0000
Message-ID: <[email protected]> (raw)
Here it says that it is okay to reuse the connection from multiple thread, as long as you create a new Statement in every thread: https://jdbc.postgresql.org/documentation/query/
This was my experience as well, I was using it in this manner and never got any data corruption or exceptions.
> If you are using threads, and several are using the database, you must use a separate Statement for each thread. Refer to [Using the Driver in a Multithreaded or a Servlet Environment](https://jdbc.postgresql.org/documentation/thread/) if you are thinking of using threads, as it covers some important points.
Then on the provided link it says the drier is not thread safe at all, and it does not cover any important points as it was promised: https://jdbc.postgresql.org/documentation/thread/
Which is it?
view thread (2+ 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 #3938: Documentation is conflicting if the drier is thread safe.
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