Re: Cache invalidation after authentication (on-the-fly role creation)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cache invalidation after authentication (on-the-fly role creation)
Дата
Msg-id 67543.1530740105@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cache invalidation after authentication (on-the-fly role creation)  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: Cache invalidation after authentication (on-the-fly role creation)  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> I'd like to do this to postinit.c:

>                 PerformAuthentication(MyProcPort);
> +               AcceptInvalidationMessages();
>                 InitializeSessionUserId(username, useroid);

> Any objections?

That seems like a *really* ad-hoc place to put it.  Why should it be
there, and not (say) somewhere inside InitializeSessionUserId, or maybe
(also?) inside PerformAuthentication?  Why do the existing call sites for
AcceptInvalidationMessages --- in particular, the ones associated with
lock acquisition --- not solve the problem already?

I'm not opposed to trying to make things better if we have a stale-cache
problem during init, just dubious that this is how to do it.

            regards, tom lane


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Следующее
От: Thomas Munro
Дата:
Сообщение: setproctitle_fast()