From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Christopher Browne <cbbrowne(at)gmail(dot)com> |
Cc: | Frederico <zepfred(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Multithread Query Planner |
Date: | 2012-01-23 19:45:34 |
Message-ID: | CAHyXU0zGX-_sE+t-FYH4mqW_H79U_dBHyqexh35fMNyJGwhU2A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 13, 2012 at 2:29 PM, Christopher Browne <cbbrowne(at)gmail(dot)com> wrote:
> On Fri, Jan 13, 2012 at 3:14 PM, Frederico <zepfred(at)gmail(dot)com> 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 still not found. I tried to use the same memory context of root process and create a new context to each new thread, but doesn't worked.
>>
>>
>> Any tips?
>
> Yes, don't try to use threads.
>
> <http://wiki.postgresql.org/wiki/Developer_FAQ#Why_don.27t_you_use_threads.2C_raw_devices.2C_async-I.2FO.2C_.3Cinsert_your_favorite_wizz-bang_feature_here.3E.3F>
>
> ... threads are not currently used instead of multiple processes for
> backends because:
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 do that with threads.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-01-23 19:49:09 | Re: GUC_REPORT for protocol tunables was: Re: Optimize binary serialization format of arrays with fixed size elements |
Previous Message | Alexander Korotkov | 2012-01-23 18:38:49 | Re: Collect frequency statistics for arrays |