Re: Rename max_parallel_degree?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Rename max_parallel_degree?
Дата
Msg-id CA+TgmoZS7DFFGz7kKWLoTAsNnXRKUiQFDt5yHgf4L73z52dgAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Rename max_parallel_degree?  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Sat, Sep 17, 2016 at 2:40 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Fri, Sep 16, 2016 at 11:54 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>
>> +       /*
>> +        * We need a write barrier to make sure the update of
>> +        * parallel_terminate_count is done before the store to in_use
>> +        */
>>
>> Does the order actually matter here?
>>
>
> I think so.  If slot->in_use is reordered before the check of
> is_parallel_worker, then it is possible that concurrent registration
> of worker can mark the is_parallel_worker as false before we check the
> flag here.  See explanation in previous e-mail [1].

Tricky.  I believe you're right.

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



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Rename max_parallel_degree?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [bug fix] pg_recvlogical is missing in the Windows installation