Skip site navigation (1) Skip section navigation (2)

Re: User-Id Tracking when Portal was started

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>, Florian Pflug <fgp(at)phlo(dot)org>
Subject: Re: User-Id Tracking when Portal was started
Date: 2012-07-03 15:42:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
2012/7/3 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> writes:
>> 2012/7/3 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>> Why not just save and restore the user ID and security context
>>> unconditionally, instead of doing this kind of dance?
>>> +               if (portal->userId != GetUserId())
>>> +                       SetUserIdAndSecContext(portal->userId, portal->secCo
>>> +               else
>>> +                       saveUserId = InvalidOid;
>> In case when CurrentUserId was updated during the code block
>> (E.g, execution of SET SESSION AUTHORIZATION), it overwrites
>> this update on restoring user-id and security-context.
> Um... what should happen if there was a SET SESSION AUTHORIZATION
> to the portal's userId?  This test will think nothing happened.
In my test, all the jobs by SET SESSION AUTHORIZATION was cleaned-up...
It makes nothing happen from viewpoint of users.

KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2012-07-03 15:42:29
Subject: Re: Posix Shared Mem patch
Previous:From: Tom LaneDate: 2012-07-03 15:41:09
Subject: Re: Posix Shared Mem patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group