Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe
Дата
Msg-id 1404739020449-5810741.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
Dave Cramer-8 wrote
> I don't think this is a JDBC issue. Rather a limitation of the postgresql
> server.

While my experience with other RDBMS is not that great I believe the
"limitation" belongs to the entire category and is probably a direct (or
indirect) result of the SQL standard.

Executing SQL commands is a linear process.  While some degree of command
execution parallelism is possible the user transaction itself is serial -
each command must end before the next command begins.  Thus the whole
premise of the parent/child setup is flawed.  If you try to have two child
threads working within a single parent transaction then by definition they
are going to be interfering with each other.

From the linked reference documentation:

"Multiple threads are permitted to share a Connection, Statement, or
ResultSet. However, the application programmer must ensure that one thread
does not affect the behavior of the others."

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Connection-setsavepoint-releaseSavepoint-is-not-thread-safe-tp5810588p5810741.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe
Следующее
От: Dave Cramer
Дата:
Сообщение: PostgreSQL JDBC new jar available