Re: auto_explain vs. parallel query

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: auto_explain vs. parallel query
Дата
Msg-id daa33ddc-409e-3105-8078-0106521ec8bb@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: auto_explain vs. parallel query  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: auto_explain vs. parallel query
Список pgsql-hackers
On 11/01/2016 03:29 PM, Robert Haas wrote:
> On Tue, Nov 1, 2016 at 10:21 AM, Tomas Vondra
> <tomas.vondra@2ndquadrant.com> wrote:
>> Clearly we need to pass some information to the worker processes, so that
>> they know whether to instrument the query or not. I don't know if there's a
>> good non-invasive way to do that from an extension - the easiest way I can
>> think of is using a bit of shared memory to pass the "sample query" flag -
>> attached is a patch that does that, and it seems to be working fine for me.
>
> Uh, isn't this going to break as soon as there are multiple parallel
> queries in process at the same time?
>

Damn! You're right of course. Who'd guess I need more coffee this early?

Attached is a fix replacing the flag with an array of flags, indexed by
ParallelMasterBackendId. Hopefully that makes it work with multiple
concurrent parallel queries ... still, I'm not sure this is the right
solution.

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Julian Markwort
Дата:
Сообщение: Re: [PATCH] pgpassfile connection option
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: emergency outage requiring database restart