Re: [HACKERS] [PATCH] A hook for session start

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] [PATCH] A hook for session start
Дата
Msg-id CAB7nPqTOP3TNQij7czR6DzpEpVBi1JKPpw52VcWviRTNkzqrBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] A hook for session start  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: [HACKERS] [PATCH] A hook for session start
Список pgsql-hackers
On Fri, Nov 10, 2017 at 2:32 AM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> On Thu, Nov 9, 2017 at 12:09 AM, Michael Paquier <michael.paquier@gmail.com>
> wrote:
>> +++ b/src/test/modules/test_session_hooks/session_hooks.conf
>> @@ -0,0 +1 @@
>> +shared_preload_libraries = 'test_session_hooks'
>> Don't you think that this should be a GUC? My previous comment
>> outlined that. I won't fight hard on that point in any case, don't
>> worry. I just want to make things clear :)
>
> Ooops... my fault... fixed!
>
> Thanks again!!

+/* GUC variables */
+static char *session_hook_username = NULL;
This causes the module to crash if test_session_hooks.username is not
set. I would recommend just assigning a default value, say "postgres".
--
Michael


--
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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] pageinspect option to forgo buffer locking?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [POC] hash partitioning