Clarification on thread-safety

From: Martin Pärtel <martin(dot)partel(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Clarification on thread-safety
Date: 2022-05-27 07:20:34
Message-ID: CAMD8JhzvPVsidUyhe3+gBkkiO1QU4VQjeq4g3pMxQe4FVmOa1A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

The docs have a very brief page on thread-safety:
https://jdbc.postgresql.org/documentation/head/thread.html
It states, pretty categorically: "The PostgreSQL™ JDBC driver is not thread
safe".
However, it's common to want to open new connections from multiple threads.

A cursory look at `PGSimpleDataSource` and `org.postgresql.Driver.connect`
suggests both of these methods are thread safe.
Perhaps this is an "obvious" level of thread-safety, but I think the doc
page spelling it out would save other paranoid folks like me some time.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Lachezar Dobrev 2022-05-27 08:40:00 Re: issue #2520 (incorrect base type from getUDTs)
Previous Message Andrei Lurie 2022-05-27 03:24:51 issue #2520 (incorrect base type from getUDTs)