Re: pg_hba_lookup function to get all matching pg_hba.conf entries

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: pg_hba_lookup function to get all matching pg_hba.conf entries
Дата
Msg-id CAJrrPGdbvM-6vEkpKhJS8+9Am9xovVrQaiERh3_2ofZHxZ0QbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_hba_lookup function to get all matching pg_hba.conf entries  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: pg_hba_lookup function to get all matching pg_hba.conf entries  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Dec 10, 2015 at 4:33 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Thu, Dec 10, 2015 at 9:51 AM, Haribabu Kommi <kommi.haribabu@gmail.com>
> wrote:
>>
>> On Thu, Dec 10, 2015 at 2:29 PM, Amit Kapila <amit.kapila16@gmail.com>
>> wrote:
>
>> > How about creating "hba parser context" and "ident parser context"
>> > at the beginning of their respective functions and don't change
>> > anything in tokenize_file()?
>>
>> The tokenize file cxt is deleted after a successful load of pg_hba.conf or
>> pg_ident.conf files. we don't need this memory once the pg_hba.conf
>> or pg_ident file is loaded, because of this reason, it is created as a
>> separate context and deleted later.
>>
>
> What about the error case?

Yes, One error case is possible when the length of the string crosses
the MAX_LINE size.
If we allocate the tokenize file cxt inside CurrentMemoryContext (i.e
MessageContext)
instead of TopMemoryContext, it will automatically freed later in case
if exists.


Regards,
Hari Babu
Fujitsu Australia



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [PROPOSAL] VACUUM Progress Checker.
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Move PinBuffer and UnpinBuffer to atomics