Re: Incorrect error message in InitializeSessionUserId - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: Incorrect error message in InitializeSessionUserId
Date
Msg-id CAJrrPGe0Ho+inqZO3uJGqq4UfreX47MBf2Y54SmbJ-v9NVssdw@mail.gmail.com
Whole thread Raw
In response to Incorrect error message in InitializeSessionUserId  (Dmitriy Sarafannikov <d.sarafannikov@bk.ru>)
Responses Re: Incorrect error message in InitializeSessionUserId  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Wed, Mar 2, 2016 at 12:21 AM, Dmitriy Sarafannikov
<d.sarafannikov@bk.ru> wrote:
> Hi all,
>
> I have found incorrect error message in InitializeSessionUserId function
> if you try to connect to database by role Oid (for example
> BackgroundWorkerInitializeConnectionByOid).
> If role have no permissions to login, you will see error message like this:
> FATAL:  role "(null)" is not permitted to log in
>
> I changed few lines of code and fixed this.
> Patch is attached.
> I want to add this patch to commitfest.
> Any objections?
>

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.

Regards,
Hari Babu
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: VS 2015 support in src/tools/msvc
Next
From: Kouhei Kaigai
Date:
Subject: Re: Way to check whether a particular block is on the shared_buffer?