Re: [HACKERS] Multithread Query Planner

2012-01-30 Thread Robert Haas
On Fri, Jan 27, 2012 at 2:56 PM, Pierre C wrote: >> Right.  I think it makes more sense to try to get parallelism working >> first with the infrastructure we have.  Converting to use threading, >> if we ever do it at all, should be something we view as a later >> performance optimization.  But I s

Re: [HACKERS] Multithread Query Planner

2012-01-28 Thread
Ok, thanks. Att, Fred 2012/1/24 Robert Haas > On Tue, Jan 24, 2012 at 11:25 AM, Tom Lane wrote: > > Robert Haas writes: > >> I doubt it. Almost nothing in the backend is thread-safe. You can't > >> acquire a heavyweight lock, a lightweight lock, or a spinlock. You > >> can't do anything th

Re: [HACKERS] Multithread Query Planner

2012-01-27 Thread Pierre C
Not to mention palloc, another extremely fundamental and non-reentrant subsystem. Possibly we could work on making all that stuff re-entrant, but it would be a huge amount of work for a distant and uncertain payoff. Right. I think it makes more sense to try to get parallelism working first

Re: [HACKERS] Multithread Query Planner

2012-01-24 Thread Robert Haas
On Tue, Jan 24, 2012 at 11:25 AM, Tom Lane wrote: > Robert Haas writes: >> I doubt it.  Almost nothing in the backend is thread-safe.  You can't >> acquire a heavyweight lock, a lightweight lock, or a spinlock. You >> can't do anything that might elog() or ereport().  None of those >> things are

Re: [HACKERS] Multithread Query Planner

2012-01-24 Thread Tom Lane
Robert Haas writes: > I doubt it. Almost nothing in the backend is thread-safe. You can't > acquire a heavyweight lock, a lightweight lock, or a spinlock. You > can't do anything that might elog() or ereport(). None of those > things are reentrant. Not to mention palloc, another extremely fund

Re: [HACKERS] Multithread Query Planner

2012-01-24 Thread Robert Haas
On Mon, Jan 23, 2012 at 2:45 PM, Merlin Moncure wrote: > Yes, but OP is proposing to use multiple threads inside the forked > execution process.  That's a completely different beast.  Many other > databases support parallel execution of a single query and it might > very well be better/easier to d

Re: [HACKERS] Multithread Query Planner

2012-01-23 Thread Merlin Moncure
On Fri, Jan 13, 2012 at 2:29 PM, Christopher Browne wrote: > On Fri, Jan 13, 2012 at 3:14 PM, Frederico wrote: >> Hi folks. >> >> Is there any restriction in create and start threads inside Postgres? >> >> I'm trying to develop a multithread planner, and some times is raised a >> exception of ac

Re: [HACKERS] Multithread Query Planner

2012-01-23 Thread Yeb Havinga
On 2012-01-13 21:14, Frederico wrote: Hi folks. Is there any restriction in create and start threads inside Postgres? I'm trying to develop a multithread planner, and some times is raised a exception of access memory. I'm debugging the code to see if is a bug in the planner, but until now, I

Re: [HACKERS] Multithread Query Planner

2012-01-14 Thread Thomas Munro
On 13 January 2012 20:14, Frederico wrote: > I'm trying to develop a multithread planner, and some times is raised a > exception of access memory. I was a bit confused about what you are trying to do -- somehow use concurrency during the planning phase, or during execution (maybe having produced

Re: [HACKERS] Multithread Query Planner

2012-01-14 Thread Dimitri Fontaine
Frederico writes: > This means it's possible use threads? The short answer is “no”. -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.

Re: [HACKERS] Multithread Query Planner

2012-01-14 Thread Frederico
This means it's possible use threads? Att, Fred Enviado via iPad Em 13/01/2012, às 20:47, Dimitri Fontaine escreveu: > Christopher Browne writes: >> Yes, don't try to use threads. >> >>

Re: [HACKERS] Multithread Query Planner

2012-01-13 Thread Dimitri Fontaine
Christopher Browne writes: > Yes, don't try to use threads. > > > > ... threads are not currently used instead of multiple processes for

Re: [HACKERS] Multithread Query Planner

2012-01-13 Thread Christopher Browne
On Fri, Jan 13, 2012 at 3:14 PM, Frederico wrote: > Hi folks. > > Is there any restriction in create and start threads inside Postgres? > > I'm trying to develop a multithread planner, and some times is raised a > exception of access memory. > > I'm debugging the code to see if is a bug in the pl

[HACKERS] Multithread Query Planner

2012-01-13 Thread Frederico
Hi folks. Is there any restriction in create and start threads inside Postgres? I'm trying to develop a multithread planner, and some times is raised a exception of access memory. I'm debugging the code to see if is a bug in the planner, but until now, I still not found. I tried to use the sa