Re: [HACKERS] Parallel worker error

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] Parallel worker error
Дата
Msg-id CAA4eK1+oLuvu8YP2707yUQkzVYME==2yJWX1yqH_h_PKK++jcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Parallel worker error  (Noah Misch <noah@leadboat.com>)
Ответы Re: [HACKERS] Parallel worker error  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sat, Sep 2, 2017 at 12:21 PM, Noah Misch <noah@leadboat.com> wrote:
> On Thu, Aug 31, 2017 at 03:11:10PM -0400, Robert Haas wrote:
>> On Wed, Aug 30, 2017 at 11:19 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> > But since that's an established design fl^H^Hprinciple, maybe that
>> > means we should go with the approach of teaching SerializeGUCState()
>> > to ignore role altogether and instead have ParallelWorkerMain call
>> > SetCurrentRoleId using information passed via the FixedParallelState
>> > (not sure of the precise details here).
>>
>> Could I get some opinions on the virtues of this approach, vs. any of
>> the other suggestions at or near
>> http://postgr.es/m/CA+TgmoaSP90E33-MU2YpGs73TtJ37m5Hv-xqHjc7TPqX9wX8ew@mail.gmail.com
>> ?
>
> It seems good to me, better than the other options in that mail.
>

It seems like the consensus is to move forward with this approach.  I
have written a patch implementing the above idea.  Note, that to use
SetCurrentRoleId, we need the value of guc "is_superuser" for the
current user and we don't pass this value to parallel workers as this
is PGC_INTERNAL guc variable.  So, I have passed this value via
FixedParallelState.

After this patch, I think the check of InitializingParallelWorker in
check_role function is redundant.  I have prepared a separate patch
for it, but may be it can be handled with the main patch to fix the
issue.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: [HACKERS] Release Note changes
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [HACKERS] [PATCH] Improve geometric types