Skip site navigation (1) Skip section navigation (2)

Re: Re: [GENERAL] postgreSQL multithreading

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: postgre(at)seznam(dot)cz
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>,pgsql-general(at)postgresql(dot)org
Subject: Re: Re: [GENERAL] postgreSQL multithreading
Date: 2008-03-30 17:25:36
Message-ID: 47EFCD10.6080303@postnewspapers.com.au (view raw or flat)
Thread:
Lists: pgsql-general
postgre(at)seznam(dot)cz wrote:
>
> What about some C dynamically loaded function in which I could call new connection for each thread?
>   
Past discussion here suggests that the backends are strictly single 
threaded. While you might be able to use multiple threads - I don't know 
- I expect you'd need to protect all SPI access by a lock that 
serialized everything anyway.

Doing it externally with a script / program that uses multiple 
connections might just be the way. Unfortunately that means that you 
don't get a single consistent snapshot - each connection will have its 
own, potentially different, view of the database state.

A possible use for read only transactions being able to share a snapshot 
came up in discussion a few weeks ago. I guess this is another one.

--
Craig Ringer

In response to

Responses

pgsql-general by date

Next:From: A. KretschmerDate: 2008-03-30 17:29:22
Subject: Re: Re: [GENERAL] postgreSQL multithreading
Previous:From: Craig RingerDate: 2008-03-30 17:17:10
Subject: Re: Survey: renaming/removing script binaries (createdb, createuser...)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group