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]

 



	Thorsten Schöning wrote:

> > The caveat you mention about IF NOT EXISTS does not apply to
> > temporary tables, as they're not shared across sessions.[...]
> 
> That's what I understood as well, but I'm creating those concurrently
> WITHIN one and the same session and transaction. :-) 

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. The best they can
do in terms of throughput is to queue up a new query while
the server is busy executing a previous one, but that's pipelining,
not parallelism.


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite






[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