Search Postgresql Archives

Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guten Tag Daniel Verite,
am Montag, 8. Juni 2020 um 12:07 schrieben Sie:

> But a SQL session on the server takes its statements from a FIFO queue
> and processes them serially, so there's no intra-session concurrency.
> In fact multi-threaded SQL clients *must* make sure that they don't
> send concurrent queries to the same connection.[...]

I was looking at JDBC-docs and those explicitly allow sharing one
connection by multiple threads, while at the same time not explicitly
forbidding concurrent access.

https://docs.oracle.com/javadb/10.8.3.0/devguide/cdevconcepts23499.html
https://docs.oracle.com/javadb/10.8.3.0/devguide/cdevconcepts89498.html

Therefore I had assumed that concurrent access is available as long as
one follows the recommened practices, which is what I do. Though, that
concurrent access seems to not be available because of additional
synchronization in the JDBC-driver of Postgres.

https://stackoverflow.com/a/52798543/2055163
https://github.com/pgjdbc/pgjdbc/blob/ecbc48ff6ad293a2555465d4f7fb6a33a403af26/pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java#L276

Is that the case with all JDBC-drivers most likely or simply some
implementation detail of some and others might allow truly concurrent
access within one session?

Nevertheless, I think I can at least partly answer some of my
questions now. So thanks for forcing digging deeper into this than
I obviously did before. :-)

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: Thorsten.Schoening@xxxxxxxxxx
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux