Re: Parallel threads in query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Parallel threads in query
Дата
Msg-id 15449.1541020276@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Parallel threads in query  (Darafei "Komяpa" Praliaskouski <me@komzpa.net>)
Ответы Re: Parallel threads in query  (Paul Ramsey <pramsey@cleverelephant.ca>)
Список pgsql-hackers
=?UTF-8?Q?Darafei_=22Kom=D1=8Fpa=22_Praliaskouski?= <me@komzpa.net> writes:
> Question is, what's the best policy to allocate cores so we can play nice
> with rest of postgres?

> What I'd like to see is some function that I can call and get a number of
> threads I'm allowed to run, that will also advise rest of postgres to not
> use them, and a function to return the cores back (or do it automatically
> at the end of query). Is there an infrastructure for that?

There is not, because we do not use or support multiple threads inside
a Postgres backend, and have no intention of doing so any time soon.
There is a huge amount of non-thread-safe infrastructure there, and
if you call any of it from other than the main thread, bad things will
happen.

You might be able to make this work if the threaded stuff is kept rigidly
separate from any core Postgres code, but it'll be error-prone.

            regards, tom lane


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Super PathKeys (Allowing sort order through precision loss functions)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Should pg 11 use a lot more memory building an spgist index?