Re[2]: [HACKERS] Incorrect error message in InitializeSessionUserId - Mailing list pgsql-hackers

From Dmitriy Sarafannikov
Subject Re[2]: [HACKERS] Incorrect error message in InitializeSessionUserId
Date
Msg-id 1457074250.87737905@f30.i.mail.ru
Whole thread Raw
In response to Re: Incorrect error message in InitializeSessionUserId  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
>On Fri, Mar 4, 2016, 5:23 +03:00 от Michael Paquier < michael.paquier@gmail.com >:
>
>> The patch adds the support of taking the role name from the role tuple
>> instead of using the provided rolename variable, because it is possible
>> that rolename variable is NULL if the connection is from a background
>> worker.
>>
>> The patch is fine, I didn't find any problems, I marked it as ready for
>> committer.
>>
>> IMO this patch may need to backpatch supported branches as it is
>> a bug fix. Committer can decide.
>
>+1 for the backpatch. The current error message should the rolename be
>undefined in this context is misleading for users.
>--
>Michael

Thanks for feedback.

This patch successfully applies to the 9.5 branch.
In 9.4 and below versions InitializeSessionUserId function has other signature:
void InitializeSessionUserId(const char *rolename)
and it is impossible to pass role Oid to this function.

In this way, the patch is relevant only to the master and 9.5 branches

Regards,
Dmitriy Sarafannikov

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: Upper planner pathification
Next
From: Robert Haas
Date:
Subject: Re: ExecGather() + nworkers