From: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe |
Date: | 2014-07-07 13:17:00 |
Message-ID: | 1404739020449-5810741.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2014-07-08 22:18:16 | PostgreSQL JDBC new jar available |
Previous Message | Dave Cramer | 2014-07-07 12:41:52 | Re: Connection.setsavepoint() / releaseSavepoint() is not thread-safe |