Re: [HACKERS] Increasing parallel workers at runtime

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Increasing parallel workers at runtime
Дата
Msg-id CA+TgmoZ2By5hF5jX+4F_i4KShoz_u+SoSV9WM9V_X4+N=mxZHQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Increasing parallel workers at runtime  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
On Tue, May 16, 2017 at 8:15 PM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> Ok. In this approach, we need to share some of the gatherstate structure
> members in the shared memory to access by the other background process
> or some better logic to update these details whenever a new worker gets
> allotted.

What I'm imagining is a shared memory array with up to, say, 32 slots
(or, say, max_worker_processes slots).  Each slot stores the PID of
the leader, the number of workers expected, and the number of workers
actually obtained.  The leader tries to claim a slot for its details
(just giving up if there are none available) and clears the slot again
at the end of the query (if it got one, and even in case of error).
The whole array is protected by a new LWLock.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Rushabh Lathia
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key