Re: What happens if I create new threads from within a postgresql function?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: What happens if I create new threads from within a postgresql function?
Дата
Msg-id 20130218170838.GA17326@momjian.us
обсуждение исходный текст
Ответ на Re: What happens if I create new threads from within a postgresql function?  (Atri Sharma <atri.jiit@gmail.com>)
Ответы Re: What happens if I create new threads from within a postgresql function?  (Atri Sharma <atri.jiit@gmail.com>)
Список pgsql-general
On Mon, Feb 18, 2013 at 10:33:26PM +0530, Atri Sharma wrote:
> >> While your threads are executing, your query can't be cancelled --
> >> only a hard kill will take the database down.  If you're ok with that
> >> risk, then go for it.  If you're not, then I'd thinking about
> >> sendinging the bytea through a protocol to a threaded processing
> >> server running outside of the database.  More work and slower
> >> (protocol overhead), but much more robust.
> >
> > You can see the approach of not calling any PG-specific routines from
> > theads here:
> >
> >    http://wiki.postgresql.org/wiki/Parallel_Query_Execution#Approaches
> >
>
>
> Is there any way to locally synchronise the threads in my code,and
> send the requests to the PostgreSQL backend one at a time? Like a waiting
> queue in my code?

Is this from the client code?  That is easy from libpq using
asynchronous queries.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

В списке pgsql-general по дате отправления:

Предыдущее
От: Atri Sharma
Дата:
Сообщение: Re: What happens if I create new threads from within a postgresql function?
Следующее
От: Atri Sharma
Дата:
Сообщение: Re: What happens if I create new threads from within a postgresql function?